mixed - Stata
mixed - Stata
mixed - Stata
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
<strong>mixed</strong> — Multilevel <strong>mixed</strong>-effects linear regression 21<br />
Heteroskedastic random effects<br />
Blocked-diagonal covariance structures and repeated-level specifications of random effects can also<br />
be used to model heteroskedasticity among random effects at a given level.<br />
Example 6<br />
Following Rabe-Hesketh and Skrondal (2012, sec. 7.2), we analyze data from Asian children in<br />
a British community who were weighed up to four times, roughly between the ages of 6 weeks and<br />
27 months. The dataset is a random sample of data previously analyzed by Goldstein (1986) and<br />
Prosser, Rasbash, and Goldstein (1991).<br />
. use http://www.stata-press.com/data/r13/childweight<br />
(Weight data on Asian children)<br />
. describe<br />
Contains data from http://www.stata-press.com/data/r13/childweight.dta<br />
obs: 198 Weight data on Asian children<br />
vars: 5 23 May 2013 15:12<br />
size: 3,168 (_dta has notes)<br />
storage display value<br />
variable name type format label variable label<br />
id int %8.0g child identifier<br />
age float %8.0g age in years<br />
weight float %8.0g weight in Kg<br />
brthwt int %8.0g Birth weight in g<br />
girl float %9.0g bg gender<br />
Sorted by: id age<br />
. graph twoway (line weight age, connect(ascending)), by(girl)<br />
> xtitle(Age in years) ytitle(Weight in kg)<br />
boy<br />
girl<br />
Weight in kg<br />
5 10 15 20<br />
0 1 2 3 0 1 2 3<br />
Graphs by gender<br />
Age in years<br />
Ignoring gender effects for the moment, we begin with the following model for the ith measurement<br />
on the jth child:<br />
weight ij = β 0 + β 1 age ij + β 2 age 2 ij + u j0 + u j1 age ij + ɛ ij