#simulate a dataset with one partially observed (conditionally) normal variable
set.seed(1234)
n <- 100
x <- rnorm(n)
y <- x+rnorm(n)
x[runif(n)<0.25] <- NA
temp <- data.frame(x=x,y=y)
#impute using normImp
imps <- normUniImp(temp, y~x, M=10, pd=FALSE)
Run the code above in your browser using DataLab