Statalist


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

st: AW: RE: AW: -margins- vs -adjust-


From   "Martin Weiss" <martin.weiss1@gmx.de>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: AW: RE: AW: -margins- vs -adjust-
Date   Wed, 4 Nov 2009 18:13:56 +0100

<> 

The initial claim was that "...with -margins- there seems to be no option to
find marginal effects for independent variables that are not i.vars.", so it
clearly does not matter whether it is dichotomous or not. All that is needed
is an "i." in front of the thing during estimation. Still, -smoke- is
dichotomous, so this also works perfectly: 



*************
webuse lbw, clear

logit low age lwt race i.smoke ptl ht ui
margins, dydx(*)

logit low age lwt race smoke ptl ht ui
margins, dydx(*)
*************



HTH
Martin


-----Ursprüngliche Nachricht-----
Von: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von Lachenbruch,
Peter
Gesendet: Mittwoch, 4. November 2009 17:59
An: statalist@hsphsun2.harvard.edu
Betreff: st: RE: AW: -margins- vs -adjust-

I tried this and it also worked, but race is not dichotomous.  Also, the
models are estimating different things.  Has the question been answered?


. tab race

       race |      Freq.     Percent        Cum.
------------+-----------------------------------
      white |         96       50.79       50.79
      black |         26       13.76       64.55
      other |         67       35.45      100.00
------------+-----------------------------------
      Total |        189      100.00

Tony

Peter A. Lachenbruch
Department of Public Health
Oregon State University
Corvallis, OR 97330
Phone: 541-737-3832
FAX: 541-737-4001


-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Martin Weiss
Sent: Wednesday, November 04, 2009 8:33 AM
To: statalist@hsphsun2.harvard.edu
Subject: st: AW: -margins- vs -adjust-


<> 

Works for me in both cases - whether -i.race- or -race- is specified...


*************
webuse lbw, clear

logit low age lwt i.race smoke ptl ht ui
margins, dydx(*)

logit low age lwt race smoke ptl ht ui
margins, dydx(*)
*************



HTH
Martin


-----Ursprüngliche Nachricht-----
Von: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von Jeph Herrin
Gesendet: Mittwoch, 4. November 2009 17:30
An: statalist@hsphsun2.harvard.edu
Betreff: st: -margins- vs -adjust-


After getting an error with -adjust-, I discovered that it
had been deprecated in version 11. The online help says:

"adjust has been superseded by margins.  margins can do everything
  that adjust did and more."

However, as far as I can tell, this is not the case. I could use
-adjust- with models that did not include factor variables; however,
with -margins- there seems to be no option to find marginal effects
for independent variables that are not i.vars.

Is this true? Or is there a way to fool -margins- into working with
non-factor variables? Apologies if this has come up before, I could
not find anything on the list or FAQ.

If it is true, this is a complete nusiance. I do not normally
include dichotomous variables as factor variables, and am not
interested in starting now. Moreover, I have estimation results
from -xtmelogit- models that ran for days; am I going to have
to re-estimate with -i.female- instead of -female- to get marginal
effects? (-adjust- gives errors). That, or calculate my own
marginal effects from scratch.

cheers,
Jeph



*
*   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/


*
*   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/

*
*   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/


*
*   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/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index