Archive for December 2010  Including covariates in crossed-
effects models  The manual entry for xtmixed documents all the
official features in the command, and several applications.
However, it would be impossible to address all the models that
can be fitted with this command in a manual entry. I want to
show you how to include covariates in a crossed-effects model.
Let me start by reviewing the crossed-effects notation for
xtmixed. I will use the homework dataset from Kreft and de Leeuw
(1998) (a subsample from the National Education Longitudinal
Study of 1988). You can download the dataset from the webpage
for Rabe-Hesketh & Skrondal (2008) (, and run all the examples
in this entry.  If we want to fit a model with variable math
(math grade) as outcome, and two crossed effects: variable
region and variable urban, the standard syntax would be:
(1)   xtmixed math ||_all:R.region || _all: R.urban  The
underlying model for this syntax is  math_ijk = b + u_i + v_j +
eps_ijk  where i represents the region and j