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: Cross-level interaction with xtmixed

From   Marc Peters <>
To   "" <>
Subject   st: Cross-level interaction with xtmixed
Date   Mon, 9 Jan 2012 09:20:06 +0000 (GMT)

Dear all, 

I am trying to run a multi-level OLS-regression with a cross-level interaction. My main model uses random intercepts (but not random slopes). 

I use the xtmixed command in Stata: 

xtmixed depvar indepvar1 indepvar2 indepvar3 indepvar|| groupvar:, var

In this model indepvar1 (continuous level-1 variable) becomes highly significant. Indepvar1 is the only level-1 variable in the model. I would like to see whether the effect of indepvar1 decreases if interacted with indepvar2 (a continuous level-2 variable with only four observed values). Since this is a cross-level interaction I need to sepcify a random slope model:

xtmixed depvar indepvar1 indepvar2 indepvar1*indepvar2 indepvar3 indepvar4|| groupvar: indepvar1, cov(un)

In this model both indepvar1 and indepvar1*indepvar2  becomes insignificant. When using the margins command to see the marginal effect of indepvar1 at the different levels of indepvar2, indepvar1 is insignificant at every level of indepvar2. I have a porblem understanding why this is or how to interpret these results. 

Rerunning model 1 with random slopes (but with no interactions) indepvar1 also gets insignificant. Is there a problem with how I have specified the models or how should I understand the results? Why is a variable insignificant with random slopes, but significant without them? 



*   For searches and help try:

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