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: xtmelogit syntax
From
[email protected] (Roberto G. Gutierrez, StataCorp)
To
[email protected]
Subject
Re: st: xtmelogit syntax
Date
Fri, 09 Jul 2010 16:09:56 -0500
Robin Jeffries <[email protected]> asks:
> I would like to confirm that this is the correct syntax for a model with
> random effects for students, within schools. I am currently using the
> following syntax:
> xi: xtmelogit outcome covariates || schoolid: || studentid:
> but it is taking upwards of 7 hours to run. (35,000 students within 26
> schools) In looking at the help file for xtmelogit I read the laplace
> option. It says that the laplace option is default when you have factor
> variables in the random effects equations. Does that mean that the syntax
> above is not correct? Schoolid and  Studentid are identifiers, and not
> continuous measures.
> Since I want student within school, should it read
> Â || schoolid: R.studentid ?
> Could someone clarify the syntax?
Your original syntax is the correct one for the model you wish to fit, but
estimation could be sped up by adding the -laplace- option:
. xi: xtmelogit outcome covariates || schoolid: || studentid:, laplace
Option -laplace- invokes the Laplace approximation, which is faster than
adadaptive Gaussian quadrature.
--Bobby
[email protected]
*
* 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/