Conditional means for the missing coordinates and the covariance
correction c_i of eq 17.44 (ESL Ex. 17.9; Little & Rubin 2002), giving the
maximum-likelihood mean and covariance; NA marks missing entries.
Usage
morie_esl_mvn_em_missing(X, max_iter = 1000, tol = 1e-12)
Arguments
- X
Data matrix with NA for missing values.
- max_iter, tol
EM controls.
Value
Named list: mean, cov, loglik (observed data), iterations,
converged.
References
Little, R. J. A. & Rubin, D. B. (2002). Statistical Analysis with
Missing Data, sec. 11.2.
Examples
i <- 1:60
Z <- cbind(sin(i), cos(2 * i) + 0.5 * sin(i))
Z[i %% 5 == 0, 2] <- NA
morie_esl_mvn_em_missing(Z)$mean
#> [1] 0.02724214 0.02194113