Monday, March 06, 2006

Re: st: gllamm and marginal effects

Ok, here's the answer to my own question. One can use gllamm to estimate the random effects probit (and random effects tobit) models (among many others, of course), and then send the parameter estimates through xtprobit or xttobit to get the marginal effects that one can calculate after estimation with those commands.

For random effects probit, the following should work:

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) mfx compute, predict(pu0)

And for random effects Tobit (where the dependent variable is left- censored only -- trivial to modify for right and left censoring):

gen var=cond(movedist==0,2,1)

gllamm ycens x1 x2 x3 , i(id) fam(gauss binom) link(ident sprobit) lv (var) fv(var) adapt matrix aa=e(b) local n=colsof(aa) matrix a=aa matrix a[1,`n'-1]=aa[1,`n'] matrix a[1,`n']=exp(aa[1,`n'-1]) xttobit ycens x1 x2 x3 , re i(id) ll(0) intpoints(30) from(a,copy) iterate(0) mfx compute, predict(pr0(0, .)) mfx compute, predict(e0(0,.)) mfx compute, predict(ys(0,.))

Hope someone finds this useful!


On 3 Mar 2006, at 15:00, David Jaeger wrote:

> I'm using gllamm to estimate a random effects probit model. > Anybody know if there's > an easy way to get marginal effects with gllamm, equivalent to > using mfx compute, predict(pu0) after > using xtprobit? > > Thanks in advance! > > > > > > __________________________________________________ > Associate Professor of Economics and Public Policy > College of William and Mary > Williamsburg, VA 23187-8795 USA > net: > ph: +1 757 221 2375 > __________________________________________________ > > > > > * > * For searches and help try: > * > * > *

* * For searches and help try: * * *


Links to this post:

Create a Link

<< Home

This page is powered by Blogger. Isn't yours?