Hello all, I am working on a multiple imputed dataset and trying to use a logistic regression model to get an adjusted probability of a binary outcome (adherence) for wealth (the model has been adjusted for education and race). I used the command -mimrgns- to get the result and want to pass the results to -marginsplot- to have the plot. However, I had a negative confidence interval (below 0) when I evaluated the confidence interval for the adjusted probability of adherence.
Here is the code:
Here is what I got:
I searched online to find why I got a negative lower confidence interval and think that it is because (1) I only have very few (around 5) people belonging to yes and (2) the model uses the delta VCE to evaluate the standard errors. The delta method ignores the boundary and calculates the standard error without considering that the adjusted probability should fall in [0,1].
I am trying to get the correct standard error by applying a different vce, but it does not work - I do not know how to use a different vce in -mimrgns-. And I am also uncertain which vce I should use to evaluate the standard error.
Can anyone offer me suggestions on which vce method I should use, and whether -mimrgns- accept a different vce to evaluate the standard error?
If -mimrgns- cannot work, do you have any other advice on any other commands that I can use to obtain the correct standard error and then the correct confidence interval and pass it to -marginsplot-? (I am afraid that I have to use -marginsplot- because I try to combine several graphs and they all use -marginsplot-)
Any suggestions are greatly appreciated! Thank you for reading the post!
Best,
Lu
Here is the code:
Code:
mi estimate: logit Adherence_Binary i.edu i.race i.wealth mimrgns i.sex predict(pr) cmdmargins
Code:
Multiple-imputation estimates Imputations = 25 Predictive margins Number of obs = 426 Average RVI = 0.0310 Largest FMI = 0.0583 DF adjustment: Large sample DF: min = 7,131.68 avg = 5.87e+07 Within VCE type: Delta-method max = 1.17e+08 Expression : Pr(Adherence_Binary), predict(pr) --------------------------------------------------------------------------------------- | Margin Std. err. t P>|t| [95% conf. interval] ----------------------+---------------------------------------------------------------- wealth | yes | .5148526 .3444198 1.49 0.135 -.1603124 1.190018 no | .4289501 .0196527 21.83 0.000 .3904315 .4674688 ---------------------------------------------------------------------------------------
I am trying to get the correct standard error by applying a different vce, but it does not work - I do not know how to use a different vce in -mimrgns-. And I am also uncertain which vce I should use to evaluate the standard error.
Can anyone offer me suggestions on which vce method I should use, and whether -mimrgns- accept a different vce to evaluate the standard error?
If -mimrgns- cannot work, do you have any other advice on any other commands that I can use to obtain the correct standard error and then the correct confidence interval and pass it to -marginsplot-? (I am afraid that I have to use -marginsplot- because I try to combine several graphs and they all use -marginsplot-)
Any suggestions are greatly appreciated! Thank you for reading the post!
Best,
Lu
Comment