Notice: On March 31, it was **announced** that Statalist is moving from an email list to a **forum**. The old list will shut down at the end of May, and its replacement, **statalist.org** is already up and running.

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

From |
Philip Ender <ender97@gmail.com> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: Re: st: RE: problem with factor variable and margins. |

Date |
Wed, 17 Mar 2010 11:01:06 -0700 |

Rich wrote: >I think I have tracked down the problem. In addition to the factor variable nainc, I have a continuous variable nainc_ainc as a regressor (which is the >indicator times a continuous variable). The margins command then got confused and assumed that nainc was an abbreviation for nainc_ainc, which did >appear in the results and subsequent tests. When I rename nainc_ainc as n2ainc_ainc, my problem goes away -- a marginal effect for the discrete >change in the factor variable nainc does indeed show up in the results. > >If I am right in diagnosing why the rename solves the problem, this means there is a bug in stata's margins. It is not reporting an ambiguous >abbreviation, it is simply picking one. Should I report it to stata's tech staff, or is that something you do, Martin? I don't think the problem is with -margins- but with the fact that you created the interaction outside of your model. If you create the interaction using the factor variables in the model then -margins- not only identifies all of the terms but produces marginal effects that take into account the interactions. Without reproducing you entire model, it would look something like this: . tobit dv i.naic c.ainc i.naic#c.ainc ... Phil -- Phil Ender UCLA Statistical Consulting Group * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

**Follow-Ups**:**Re: st: RE: problem with factor variable and margins.***From:*Rich Steinberg <rsteinbe@iupui.edu>

- Prev by Date:
**st: RE: RE: problem with _request()** - Next by Date:
**st: RE: is it possible to write explicit equation, GMM estimation with constraints ??** - Previous by thread:
**RE: Re: st: RE: problem with factor variable and margins.** - Next by thread:
**Re: st: RE: problem with factor variable and margins.** - Index(es):