High School and Beyond (HSB)

Dataset Description

A subset of data from the 1982 High School and Beyond (HSB) survey used as examples for HLM software.

?merTools::hsb

A data frame with 7,185 observations on the following 8 variables.

  • schid: a numeric vector, 160 unique values
  • mathach: a numeric vector for the performance on a standardized math assessment
  • female: a numeric vector coded 0 for male and 1 for female
  • ses: a numeric measure of student socio-economic status
  • minority: a numeric vector coded 0 for white and 1 for non-white students
  • schtype: a numeric vector coded 0 for public and 1 for private schools
  • meanses: anumeric, the average SES for each school in the data set
  • size: a numeric for the number of students in the school

Import HSB dataset

dat <- merTools::hsb
head(dat, 10)
   schid minority female    ses mathach size schtype meanses
1   1224        0      1 -1.528   5.876  842       0  -0.428
2   1224        0      1 -0.588  19.708  842       0  -0.428
3   1224        0      0 -0.528  20.349  842       0  -0.428
4   1224        0      0 -0.668   8.781  842       0  -0.428
5   1224        0      0 -0.158  17.898  842       0  -0.428
6   1224        0      0  0.022   4.583  842       0  -0.428
7   1224        0      1 -0.618  -2.832  842       0  -0.428
8   1224        0      0 -0.998   0.523  842       0  -0.428
9   1224        0      1 -0.888   1.527  842       0  -0.428
10  1224        0      0 -0.458  21.521  842       0  -0.428