| schools | R Documentation |
Data set used by Kreft and De Leeuw in their book Introducing Multilevel Modeling, Sage (1988) to analyse the relationship between math score and time spent by students to do math homework. The data set is a subsample of NELS-88 data consisting of 10 handpicked schools from the 1003 schools in the full data set. Students are nested within schools and information is available both at the school and student level.
data("schools")
A data frame with 260 observations on the following 19 variables.
schidSchool ID: a numeric vector identyfing each school.
stuidThe student ID.
sesSocioeconomic status.
meansesMean ses for the school.
homeworkThe number of hours spent weekly doing homeworks.
whiteA dummy for white race (=1) versus non-white (=0).
parentedParents highest education level.
publicPublic school: 1=public, 0=non public.
ratioStudent-teacher ratio.
percminPercent minority in school.
mathMath score
sexSex: 1=male, 2=female.
raceRace of student, 1=asian, 2=Hispanic, 3=Black, 4=White, 5=Native American.
sctypeType of school: 1=public, 2=catholic, 3= Private other religion, 4=Private non-r.
cstrClassroom environment structure: ordinal from 1=not accurate to 5=very much accurate.
scsizeSchool size: ordinal from 1=[1,199) to 7=[1200+).
urbanUrbanicity: 1=Urban, 2=Suburban, 3=Rural.
regionGeographic region of the school: NE=1,NC=2,South=3,West=4.
schnumStandardized school ID.
The data set is used in the example section to illustrate the use of functions MatchW and MatchPW.
Ita G G Kreft, Jan De Leeuw 1988. Introducing Multilevel Modeling, Sage National Education Longitudinal Study of 1988 (NELS:88): https://nces.ed.gov/surveys/nels88/
See also MatchW, MatchPW
data(schools)
# Kreft and De Leeuw, Introducing Multilevel Modeling, Sage (1988).
# The data set is the subsample of NELS-88 data consisting of 10 handpicked schools
# from the 1003 schools in the full data set.
# To study the effect of the homeworks on the outcome math score, conditional on
# confounder(s) X and unobserved school features, we can define the following variables:
X<-schools$ses
# or define a vector for more than one confounder
X<-as.matrix(schools[,c("ses","white","public")])
Y<-schools$math
Tr<-ifelse(schools$homework>1,1,0)
Group<-schools$schid
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.