Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

Re: st: problem with Margin command and interaction graph in fixed effect logistic regression


From   Alfonso Sánchez-Peñalver <[email protected]>
To   Stata List <[email protected]>
Subject   Re: st: problem with Margin command and interaction graph in fixed effect logistic regression
Date   Thu, 31 Oct 2013 14:57:43 -0400

Hi Nahla,

I’ve digged a little more into this. First, I found this in the archive using clogit and margins:

http://www.stata.com/statalist/archive/2010-08/msg01454.html

It seem that you have to specify the dydx() and predict options to have it work. To illustrate, the following two examples work

——————————— Begin Code ——————————————
webuse lowbirth2, clear
clogit low lwt smoke ptd ht ui i.race, group(pairid)
margins race, dydx(lwt) predict(pu0) at(lwt=(100(10)200))
——————————— End Code ———————————————

However, the following does not

——————————— Begin Code ——————————————
webuse lowbirth2, clear
clogit low c.lwt##i.smoke ptd ht ui i.race, group(pairid)
margins race, dydx(lwt) predict(pu0) at(lwt=(100(10)200))
——————————— End Code ———————————————

The problem is that it predicts the marginal effects when the fixed effects are zero. I hope this sheds some light.

Alfonso

On Oct 31, 2013, at 12:51 PM, Nahla Betelmal <[email protected]> wrote:

>> margins drug, at(studytime=(10(5)30))


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


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index