Reputation: 155
I have data with missing values which I imputed using the MICE package.
impData <- mice(analysis_set,m=5,maxit=50,meth='pmm',seed=500)
Now I need to run logistic regression analysis:
modelFit1 <- with(data = impData,
exp = glm(formula = Outcome ~ inputVar1 + inputVar2 + inputVar3,
family = binomial(link = "logit")))
I can get a pooled analysis using:
pool(modelFit1)
And more info using:
summary(pool(modelFit1))
The last command shows the estimates, SE, t, df, Pr(>|t|), lo 95, hi 95, nmis, fmi and lambda.
My question is: is there an easy way to obtain the ORs and 95% CI from the pooled analysis?
I used to do that on a dataset using:
exp(cbind(OR = coef(mylogit), confint(mylogit)))
where mylogit is the glm() for a dataset. Is there an equivalent to that for the pooled analysis?
Upvotes: 1
Views: 4128
Reputation: 21
The pooled object is under the class mipo
from MICE package.
summary(pool(modelFit1), conf.int = TRUE, exponentiate = TRUE)
gives both Odds Ratio (estimate) and corresponding CIs.
Upvotes: 2
Reputation: 155
Thanks @user20650
summaryPool <- summary(pool(modelFit1))
exp(cbind(summaryPoolM2[,1],summaryPoolM2[,6],summaryPoolM2[,7]))
Column 1 is the estimates, 6 and 7 are the ln(95% confidence intervals). Exponentiating these values gives the ORs and 95% CIs.
Upvotes: 1