Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: MI margins

From   "Goin, Dana" <>
To   statalist <>
Subject   st: MI margins
Date   Mon, 29 Oct 2012 13:46:53 +0000

Im getting unexpected results when using the margins command with multiply imputed data. Im using Stata 12.1 for Windows.
I’m estimating two linear probability models. One estimates the likelihood of a doctor’s visit for those without health insurance and for those who have Medicaid. The other model does the same (i.e. estimates the likelihood of a doctor’s
 visit) for those without health insurance and for those with private health insurance. I’m using -margins- to predict the likelihood of a doctor’s visit if the previously uninsured got Medicaid or private coverage.

After running the regression, I’ve used an ado file to make -margins- compatible with the mi commands. Here’s the code I used for the ado file:

program uninmargins, eclass properties(mi)
  version 12
  args var cov_flag 
  svy, subpop(if (unin_flag==1 | `cov_flag'==1)): reg `var' `cov_flag' $regvars
  margins if unin_flag==1, subpop(if (unin_flag==1 | `cov_flag'==1)) at(`cov_flag'=(0 1)) post

where `var’ is the various doctor visit indicators and `cov_flag’ is first for Medicaid and then for private coverage.

And here’s the code in my do file: 
mi estimate, post esampvaryok cmdok: uninmargins `var’ `cov_flag’

Here is my problem: the margins assigning everyone to be uninsured (i.e. `cov_flag’==0) are
exactly the same for both models (but the standard errors are not). Does this make sense? It seems to me that the initial regression includes different populations and has different coefficients, so even though I’m restricting the margins to the uninsured
 in both scenarios they should not be the same. Is that wrong? 
Here’s the first margin, for the uninsured and Medicaid: 
             |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
         _at |
          1  |   .8088408   .0150372    53.79   0.000     .7793684    .8383132
          2  |   .9046395   .0107063    84.50   0.000     .8836547    .9256242
And here’s the second, for the uninsured and private health insurance:

             |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
         _at |
          1  |   .8088408    .014756    54.81   0.000     .7799196     .837762
          2  |   .9119163   .0149138    61.15   0.000     .8826857    .9411469
Any help would be greatly appreciated. 
Thank you,
Dana Goin

*   For searches and help try:

© Copyright 1996–2016 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index