Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

Re: st: xtmelogit syntax


From   Robin Jeffries <rjeffries@ucla.edu>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: xtmelogit syntax
Date   Sun, 11 Jul 2010 10:11:41 -0700

Adding the laplace option brought the computation time from ~7h to
~3h, is there any way I could run say only the school level random
effects model, and use those estimates as starting values for the
school + student random effects model? If so, could someone kindly
provide the syntax to save the results?

I'm also a little concerned because I've had to run it several
different times due to other problems, and the same model seems to
take a different number of iterations to achieve convergence each
time, and it converges to a different log-likelihood value each time.
I was not able to monitor the parameter estimates to see how they
differed at all. Is this a concern?

-Robin


On Fri, Jul 9, 2010 at 2:09 PM, Roberto G. Gutierrez, StataCorp
<rgutierrez@stata.com> wrote:
> Robin Jeffries <rjeffries@ucla.edu> 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
> rgutierrez@stata.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/
>

*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index