0

With the mice package, how do we check for the residuals sum of squared of the pooled analysis?

library(mice) 
imp <- mice(nhanes, seed = 24500)
fit <- with(imp, lm(chl ~ age + bmi))
pool(fit)
summary(pool(fit))

fit contains the analysis for each input dataset and pool(fit) the pooled results. Is there a command to check the residuals sum of squared for a standard lm object, something like residuals(pool(fit))?

ChrisGPT was on strike
  • 127,765
  • 105
  • 273
  • 257
Ali
  • 1
  • 4
  • For my above posted example i assumed MCAR assumption for my data analysis. anyone can tell this analysis commands is for MCAR or MAR? Am i doing rite analysis under MCAR? – Ali Dec 13 '16 at 20:03

1 Answers1

0

you can extract the residuals for each of the input dataset with the function res= sapply(fit[[4]],residuals)

and one option (although I don't think it's been published anywhere) is to average the residuals over the multiple imputed datasets, apply(res,1,mean)

Lylou
  • 1