Bookmark and Share

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

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

st: margins after xtlogit,fe

From   André Ferreira Coelho <>
To   <>
Subject   st: margins after xtlogit,fe
Date   Tue, 25 Dec 2012 03:55:28 +0100

Dear Statalist, 

I've have been trying to compute marginal effects after xtlobit, fe with
an interaction term.  

Essentially my model is xkc_f1 = xkc lnden c.xkc1#lnden, where xkc_f1 is a
leading dummy variable and lnden is continuous.

And the -margins, dydx- work fine after -logit-. 

Tough, i am not sure about how to handle with xtlogit, fe. It seems that
-predict- pu0 (which is not adequate for FE), xb and pc1 are possible

However, writing

xtlogit f1.xkc xkc lndens c.xkc#c.lndens, fe
margins, dydx(*) predict(xb)

produces the following output:

Average marginal effects                          Number of obs   =     
Model VCE    : OIM

Expression   : Linear prediction, predict(xb)
dy/dx w.r.t. : xkc lndens lnpinteract 2.time 3.time 4.time 5.time 6.time

             |            Delta-method
             |      dy/dx   Std. Err.      z    P>|z|     [95% Conf.
         xkc |    .406874   .0246301    16.52   0.000     .3585998   
      lndens |   .1191858   .0125079     9.53   0.000     .0946708   
 lnpinteract |     .03134   .0077541     4.04   0.000     .0161422   

While, -margins, dydx(*) predict(pc1)- generates the error message:
"predict option pc1 not appropriate with margins"

I was wondering if margins is correctly applied and if there is any
different way for using -pc1- option.

I know that odds-ratio are generally preferable but following Marteen Buis
(2010) article I was also thinking in present both EM and OR.

Thank you in advance for any answers.


*   For searches and help try:

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