| Caschool | R Documentation |
Test scores, school characteristics and student demographics of 420 school districts in California, 1998-1999
(kindergarten to grade 6 or 8), as used by Stock and Watson (2007) and in package Ecdat. The data of the
semiparametric example with several smooth terms and two random intercepts in the overview article
(vignettes/articles/overview.Rmd).
data(Caschool)
A data frame with 420 rows and 17 columns:
district code.
county (a factor with 45 levels).
district (a factor).
grade span of the district: "KK-06" or "KK-08".
total enrollment.
number of teachers.
percentage of students qualifying for CalWORKs (income assistance).
percentage of students qualifying for a reduced-price lunch.
number of computers.
average test score (the mean of readscr and mathscr).
computers per student.
expenditure per student.
student-teacher ratio.
district average income (in USD 1000).
percentage of English learners.
average reading score.
average math score.
California Department of Education, data of 1998-1999; package Ecdat (Croissant and Graves), data set
Caschool.
Stock, J. H. and Watson, M. W. (2007). Introduction to Econometrics, 2nd edition. Addison-Wesley, chapters 4-7.
data(Caschool)
Caschool$log.avginc <- log(Caschool$avginc)
# math scores against three covariates, each a smooth curve, with random
# intercepts for counties and grade spans
fit <- semireg_tmb(mathscr ~ s(calwpct, bs = "os", k = 12) + s(log.avginc, bs = "os", k = 5) +
s(compstu, bs = "os", k = 12) + (1 | county) + (1 | grspan), data = Caschool)
semipred(fit, covariate = "log.avginc")$plt
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.