# true data
x <- rnorm(100,0,1)
y <- rpois(100,40)
# create artificial missingness on y
y [seq(1,100,10)] <- NA
dat.xy <- data.frame(x,y)
# imputation
mi.count(y ~ x, data = dat.xy)
Run the code above in your browser using DataLab