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
Nahla Betelmal <[email protected]>
To
"[email protected]" <[email protected]>
Subject
Re: st: problem with Margin command and interaction graph in fixed effect logistic regression
Date
Fri, 1 Nov 2013 15:31:38 +0000
Thank you both Alfonso and Klaus for the great help.
I run the following command for each interaction, all worked fine.
margins DV, predict(pu0) at( IVA=(-1.5(0.5)1.5))
margins DV, predict(pu0) at( IVB=(-1.5(0.5)1.5))
margins DV, predict(pu0) at( IVC=(-1.5(0.5)1.5))
I did not use dydx as I did not fully understand it
Thank you so much
Nahla
On 31 October 2013 18:57, Alfonso Sánchez-Peñalver
<[email protected]> wrote:
> 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/
*
* 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/