Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

imp.norm

Impute missing multivariate normal data


Description

Draws missing elements of a data matrix under the multivariate normal model and a user-supplied parameter

Usage

imp.norm(s, theta, x)

Arguments

s

summary list of an incomplete normal data matrix x created by the function prelim.norm.

theta

value of the normal parameter under which the missing data are to be randomly imputed. This is a parameter vector in packed storage, such as one created by em.norm or da.norm.

x

the original data matrix used to create the summary list s. If this argument is not supplied, then the data matrix returned by this function may disagree slightly with the observed values in x due to rounding errors.

Details

This function simply performs one I-step of data augmentation.

Value

a matrix of the same form as x, but with all missing values filled in with simulated values drawn from their predictive distribution given the observed data and the specified parameter.

WARNING

Before this function may be used, the random number generator seed must be initialized with rngseed at least once in the current S session.

References

See Section 5.4.1 of Schafer (1996).

See Also

Examples

data(mdata)
s <- prelim.norm(mdata)   #do preliminary manipulations
thetahat <- em.norm(s)   #find the mle
rngseed(1234567)   #set random number generator seed
ximp <- imp.norm(s,thetahat,mdata)  #impute missing data under the MLE

norm

Analysis of Multivariate Normal Datasets with Missing Values

v1.0-10.0
GPL (>= 2)
Authors
Ported to R by Alvaro A. Novo <alvaro@novo-online.net>. Original by Joseph L. Schafer <jls@stat.psu.edu>.
Initial release
2022-04-02

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.