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]

st: Re: Syntax for Gllamm 3 level model with random slope


From   "Joseph Coveney" <jcoveney@bigplanet.com>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: Re: Syntax for Gllamm 3 level model with random slope
Date   Sun, 15 May 2011 21:03:42 +0900

Aimee wrote:

I am trying to fit a 3 level model (conceptions nested within cow id numbers
nested within years). I have 5 conception covariates -all of which are
dichotomous (rp metr preglame pregmast preabort). My outcome is a
dichotomous: abortion or no abortion. I also have a time variable (days in
milk (dim)) which I think should be included as a random slope at the
conception level. 

Could anyone help me with the syntax for such a model? I have tried using: 

. eq cons: 1

. eq slope: dim
. gllamm abort preabort rp metr preglame pregmast dim, i(id year) nrf(2 1)
eqs(cons slope cons)

but Stata returns the message (after a long time) that convergence could not
be achieved. 

Any help would be greatly appreciated!

--------------------------------------------------------------------------------

I can't tell whether you just forgot to include -family(binomial) link(logit)-
or not in your post, but your -gllamm- model, as shown, is for a Gaussian error
distribution, i.e., for continuous outcome variable instead of for a dichotomous
outcome variable.

Why not give -xtmelogit- a try?  It'd be something like:
xtmelogit abort <other covariates> c.dim || year: || id: dim

Joseph Coveney


*
*   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