My question is about differences in approaches to analysing data generated with Multiple-Imputation via Chained Equations.
I am using the R-package: MICE
Broadly my query describes the following siutation:
- Take a dataset X missing values of some variables 1,2,3.
- Apply Multiple Imputation via Chained Equations.
- Generate Z complete datasets
Impute Data imputed <- mice(data = heartattack, m =20, maxit = 50, seed = 100)
- Compare two different approaches to analysing that data
My question is whether the output of the next two steps should be the same (I think not but am new to MICE so want to check):
1) Combine the multiple complete datasets into a single long dataset. Run a model (say logistic regression) on this long-combined dataset.
imputed_long <- complete(imputed, "long") imputed_long_model <- glm(attack~ smokes+female+hsgrad, family = binomial(), data = imputed_long) imputed_long_OR <- exp(cbind(OR = coef(imputed_long_model), confint(imputed_long_model))) imputed_long_summary <- summary(imputed_long_model) imputed_long_summary <- cbind(imputed_long_OR, imputed_long_summary$coeffiecients) imputed_long_summary
2) Run the model on each imputed dataset and pool the results.
imputed_model <- with(imputed,glm(attack~ smokes+female+hsgrad, family = binomial())) imputed_model_summary <- (summary(pool(imputed_model))) imputed_model_OR <- exp(cbind(imputed_model_summary[,1],imputed_model_summary[,6],imputed_model_summary[,7])) imputed_model_summary <- (cbind(imputed_model_OR,imputed_model_summary)) imputed_model_summary
I seem to get similar point estimates for the dependent variable effect-size but different 95% CIs (tighter 95% CIs in the long dataset model). I wondered if this is because the long-dataset model will only account for within-imputation model (i.e uncertainty in the model) but not the between-imputation variability - because by making the data into a single long dataset you have removed that.
My feeling from reading the literature is that Approach 2 (run on each imputed dataset then pool) is the correct one but would be grateful for feedback!
Please let me know if clarifications needed.