Skip to content
Prev 9302 / 20628 Next

Linear mixed modeling following multiple imputation.

I haven't used Amelia before, but I have done multiple imputation, using 
the mice package, followed by linear mixed models. I see on p13 of 
http://r.iq.harvard.edu/docs/amelia/amelia.pdf that write.amelia() 
outputs a csv file of each completed dataset. There may be a more direct 
way to access the completed datasets but something like this should work:

write.amelia(obj=a.out, file.stem = "outdata")

diff <-list(m)  # a list to store each model

for (i in 1:m) {
	file.name <- paste("outdata", m ,".csv",sep="")
	data.to.use <- read.csv(file.name)
	diff[[m]] <- lmer(trans1 ~ time*negative + (time | Subject), +
	data = data.to.use )
}

Here m is the number of imputed datasets.

Does Amelia handle the multilevel/clustered aspect of your data ? mice 
has some basic multilevel imputation capabilities but perhaps I should 
take a closer look at Amelia. This is actually of great interest to me.

Hope it helps
Rob
On 03/12/2012 18:23, Matthew Boden wrote: