[R] Amelia: pool data from multiple imputated datasets - for descriptives
rawsonk at psychiatry.wustl.edu
Wed Aug 6 22:58:04 CEST 2014
I used AmeliaView to create 5 imputed datasets. I want to pool the 5 imputed datasets into one to get pooled descriptive information (means, SD, min/max, etc) that is needed to calculate RCI scores (corrected for measurement error and practice effects).
The formula to calculate RCI is ((X2 - X1) - (M2 - M1))/S.E.D. where
X1 is observed pre-test score
X2 is observed post-test score
M1 is the group mean pre-test score
M2 is the group mean post-test score, and
S.E.D. is the standard deviation of the mean observed difference score.
My data is currently in long form. I have an ID variable, pre/post data, week, and imputed dataset number.
ID var1 var2 var3 var4 week impdataset#
555 16 10 8.87 6 3 1
555 18 12 9 6 7 1
777 12 10 9 7 3 2
777 15 13 8 6 7 2
I have searched several sites, but none of the threads exactly answer my question.
I was able to bind/append them into one dataset using:
> ameliaimpute <- rbind(imp1, imp2, imp3, imp4, imp5)
I see I can use packages like Zelig to conduct regression on bound data, but I don't see a way to get the descriptives on pooled data.
I also tried MICE - but it is just appending the imputed datasets also.
>imp <-mice(cogspss, maxit=5)
>com <- complete(imp, "long", inc=TRUE)
>com <- cbind(com, Imputation_ = as.integer(com$.imp)-1)
One person mentions "I know that I can use Rubin's rules (implemented through any multiple imputation package in R) to pool means and standard errors..."
This sounds like it would answer my question but I have not been able to find a tool that does this.
RStudio Version 0.98.953
R x64 3.0.2
Windows 7 Enterprise 64 bit
Thank you for your time.
The materials in this message are private and may contain Protected Healthcare Information or other information of a sensitive nature. If you are not the intended recipient, be advised that any unauthorized use, disclosure, copying or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error, please immediately notify the sender via telephone or return mail.
More information about the R-help