creating new variables after multiple imputation

21 views
Skip to first unread message

Ionut Mone

unread,
Jul 30, 2018, 10:57:26 AM7/30/18
to lavaan
Hello,

I would like to know if it is possible to create a new variable after multiple imputation by using mice or Amelia and what would be the function. There is a lower percentage of missing data at the item level and i would like to impute at the item level and then create a new variable that represents the individual`s scale score. If i impute after i calculate the scale scores the percentage of missing data is higher. 

Terrence Jorgensen

unread,
Jul 31, 2018, 6:55:12 AM7/31/18
to lavaan
I would like to know if it is possible to create a new variable after multiple imputation by using mice or Amelia and what would be the function.

You can loop over a list of imputed data sets to add a composite manually:

for (m in 1:length(imps)) {
  imps
[[m]]$new.variable <- rowSums(imps[[m]][c("item1","item2","item3")])
}


You can also see how to use the ?within.mitml.list function in the "mitml" package (multiple imputation tools for multilevel data).

Terrence D. Jorgensen
Postdoctoral Researcher, Methods and Statistics
Research Institute for Child Development and Education, the University of Amsterdam

Ionut Mone

unread,
Jul 31, 2018, 7:49:32 AM7/31/18
to lav...@googlegroups.com
Thank you for the answer very much!

--
You received this message because you are subscribed to the Google Groups "lavaan" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lavaan+unsubscribe@googlegroups.com.
To post to this group, send email to lav...@googlegroups.com.
Visit this group at https://groups.google.com/group/lavaan.
For more options, visit https://groups.google.com/d/optout.



--
Mone Ionut-Sergiu
PhD Student
Developmental Psychology Laboratory
Department of Psychology 
Babes-Bolyai University 
400015 Republicii 37 
Cluj-Napoca, Romania 
Reply all
Reply to author
Forward
0 new messages