有人知道插补的工作原理吗?我的意思是背后的方程式?
我尝试了一个非常简单的数据集:
X
|
ÿ
|
| 1个 |
1个 |
2
|
2 |
3
|
。 |
| 4 |
4 |
| 5 |
5 |
我做了带有收缩的多元正态分布,它很好地填充了Y = 3的缺失值。
然后我做了同样的事情:
X
|
ÿ
|
| 1个 |
1个 |
2
|
2 |
3
|
3 |
| 4 |
。 |
| 5 |
5 |
结果为Y = 3.584。
我想知道有关多元正态插补算法工作原理的详细信息,但我在任何地方都找不到任何简单的解释。 有什么线索吗?
的例程多元正态归因() 是由 @ chris_gotwalt1 要么 @clay_barker 。当需要数据插补时,我在Multivariate中将此例程称为“例程”。
我猜您希望估算的值与其旁边的值相同。这种期望是不现实的。
想想正常以该功能的名义,并设想一个普通的CDF,以您的情况为中心,以3为中心,极限为1和5。仅3是精确值。其他则处于极限。这是非常简单的,目的是让您感觉到它,而不是它实际上是如何工作的。
我无法详细说明Multivariate Normal Impute()的工作原理,但是估算值是受均值,协方差影响,并受最小值和最大值限制。
我创建了以下jsl以帮助演示其工作原理。
///////////////////////////////////////// JSL explains how data is imputed by Multivariate Normal Impute ////////////////////////////////////////////////////
/***************************************************************************************
y = Multivariate Normal Impute( yVec, meanYvec, symCovMat, colMin, colMax )
Returns a response vector with imputed values for the missing values in the
[[yVec]] vector of responses. Imputations are based on a multivariate normal
distribution with mean vector [[meanYvec]] and symmetric covariance matrix [[symCovMat]].
Optional arguments [[colMin]] and [[colMax]] are the respective vectors of column minimums
and maximums. These arguments provide bounds for the imputations."
******************************************************************************************/
//Imputation example
matFull=[1 1,
2 2,
3 3,
4 4,
5 5
];
for (i=1, i<=N Row( matFull), i++,
mat=matFull;
mat[i,2]=.;
//calculate a variance
cov = Covariance(
mat,
<
谢谢 @jianfeng_ding !这非常有帮助。 我可以“看到”它现在如何工作。
杰瑞