|Data preparation in Stata: Sorting datasets|
Garner and Raudenbush (1991) and Raudenbush and Bryk (2002) studied the role of school and neighbourhood effects on educational attainment. The data set they used (neighbourhood.dta) was for young people who left school between 1984 and 1986 from one Scottish Educational Authority. The same data were used by Rabe-Hesketh and Skrondal (2005, exercise 2.2).
Garner, C. L., and Raudenbush, S. W., (1991), Neighbourhood effects on educational attainment: A multilevel analysis of the influence of pupil ability, family, school and neighbourhood, Sociology of education, 64, 252-262.
Raudenbush, S. W., and Bryk, A. S., (2002), Hierarchical Linear Models, Sage, Thousand Oaks, CA.
Rabe-Hesketh, S., and Skrondal, A., (2005), Multilevel and Longitudinal Modelling using Stata, Stata Press, Stata Corp, College Station, Texas.
Number of observations (rows): 2310
The first few lines of neighborood.dta
The neighborhood.dta dataset could be used for random effects models at both the school and neighborhood levels. To obtain separate datasets for each level, with each one sorted on a particular variable (which will be specified as the case variable within Sabre) we can use
The first few lines of neighborood2.dta
This data set can now be read directly into Sabre, see for example, Exercise C2.
Other links: Centre for e-Science | Centre for Applied Statistics