Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: cross-level effects in gllamm


From   "Stas Kolenikov" <[email protected]>
To   [email protected]
Subject   Re: st: cross-level effects in gllamm
Date   Fri, 1 Sep 2006 11:12:13 -0500

Typically in econometrics, you would use the product of the variables
to model the interaction. In multilevel modeling, you model this by
saying, "The slopes are my level-2 outcomes, and I want to model the
slope for x1 using z1". Thus you would need to specify -eqs- with the
equation that would have a constant and z1, and your model will have
two random effects, both augmented with z1: a random intercept and a
random slope for x1. The way you've used -gllamm- in the way you've
given, it is equivalent to -xtlogit, re-, but probably a few times
slower. If you really hate random slopes models, you can try to
constrain the variance of the second random effect to zero, but then
the covariance between the two random effects is underidentified, and
the model may fail to converge.

On 9/1/06, Inna Khousnoullina <[email protected]> wrote:
Dear statalist-participants,


I'd like to estimate my two-level nested logit model using gllamm.
The level-one variables are x1, x2, x3, the level-two-variable is z1 and
the dependent variable on level one is a binary variable y. The
id-variable for level2 is "state".
The model should include a random intercept and a cross-level-effect
between x1 and z1.
Here is the syntax I used:

gen cross=x1*z1

gllamm y x1 x2 x3 z1 cross, i(state) family(binomial) link(logit) adapt


My question is: can I define the cross-level effect in the way I did
(simply by generating a new variable)????? Should I use the option
-eqs- in this case or is it just for modelling random slopes (which I
don't want to model)?

Many thanks for help,

Inna Khousnoullina
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


--
Stas Kolenikov
http://stas.kolenikov.name
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index