有人知道插補的工作原理嗎?我的意思是背後的方程式?
我嘗試了一個非常簡單的數據集:
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 !這非常有幫助。 我可以“看到”它現在如何工作。
傑瑞