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]

st: Re: gllamm, gllapred, and marginal effects


From   jsw <[email protected]>
To   [email protected]
Subject   st: Re: gllamm, gllapred, and marginal effects
Date   Mon, 6 Jun 2011 06:54:19 -0700 (PDT)

One circuitous option is to run the -gllamm- command through -xtlogit-, and
then use run -margins- (or mfx).  Credit goes to David Jaeger who posted the
solution on the Statalist in 2006
(http://statalist.blogspot.com/2006/03/re-st-gllamm-and-marginal-effects.html).  

For a random effects probit model, here's a slightly modified version of
Jaeger's code: 

gllamm y x1 x2 x3 , i(id) link(probit) fam(binom) adapt 
matrix a=e(b) 
* local n=colsof(a)
* matrix a[1,`n']=ln(a[1,`n']) 
xtprobit y x1 x2 x3 , re i(id) from(a,copy) intpoints(30) iterate(0) 
margins, dydx(*) predict(pu0)

I commented out two lines, because the code wouldn't run with them and I
seemed to be getting the correct answers without them.  If they are
essential, I would love to know.  

This approach can be modified for -xtlogit- and many other estimation
commands.  

Justin 


--
View this message in context: http://statalist.1588530.n2.nabble.com/gllamm-gllapred-and-marginal-effects-tp5815877p6445221.html
Sent from the Statalist mailing list archive at Nabble.com.
*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index