Multiple logistic regression odds ratio on multiply imputed data in R using mice #531
mona935
started this conversation in
Impute, analyse and pool
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am running a hierarchical logistic regression analysis using multiply imputed data in R (using the mice and miceafter packages). I am unable to get the odds ratio and 95% CI per variable adjusted for all other predictor variables.
Here is what I have done so far:
Model1 <- with(imp, glm(complaints ~ Sex + Age + Education, family = binomial(link = 'logit')))
pool.model1 <- summary(pool(Model1), conf.int = TRUE, exponentiate = TRUE)
Now, I manage to get odds ratios, but only separately per combination of predictor and dependent variable:
long <- mice::complete(imp, "long", include = TRUE)
imp_data <- df2milist(long, impvar=".imp")
ra <- with(imp_data, expr=odds_ratio(complaints ~ Sex))
OR <- pool_odds_ratio(ra)
If I add another predictor I get the following error:
Is there a way to get the pooled odds ratio and corresponding 95% CI per predictor variable in a model of multiple predictors?
Beta Was this translation helpful? Give feedback.
All reactions