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, **statalist.org** is already up and running.

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

From |
Austin Nichols <austinnichols@gmail.com> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: MI margins |

Date |
Tue, 30 Oct 2012 10:34:20 -0400 |

Dana Goin <DGoin@urban.org>: It is a little hard to follow what you are doing, or even what you are asking, with all the -mi- and -svy- clutter. But it seems you are comparing mean number of doctor visits for the uninsured to those with Medicaid, then comparing mean number of doctor visits for the uninsured to those with private coverage. The mean number of doctor visits for the uninsured is apparently .8088408 but the standard error on that estimate depends on what other observations are included in your regression. The set of observations (not "population" as in "initial regression includes different populations") giving that estimate is the same in both regressions (i.e. cases with unin_flag==1), so you should hope to get the same estimates in each case. However, a linear regression of a count variable on predictors may not give you the high-quality inference you seem to be aiming for; -glm- with a log link is much more appropriate for a count outcome like number of visits. On Mon, Oct 29, 2012 at 9:46 AM, Goin, Dana <DGoin@urban.org> wrote: > 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 > > end > > 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: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/faqs/resources/statalist-faq/ * http://www.ats.ucla.edu/stat/stata/

**References**:**st: MI margins***From:*"Goin, Dana" <DGoin@urban.org>

- Prev by Date:
**Re: st: -save- a varlist** - Next by Date:
**Re: st: Interaction Variables with regards to xtabond2** - Previous by thread:
**st: MI margins** - Next by thread:
**st: Treating interactions exogenously or endogenously in xtabond2** - Index(es):