Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[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" <>
To   <>
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:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index