Description Usage Format Details Source Examples
School Data, from Charnes et al. (1981). The aim is to explain scores on 3
different tests, reading
, mathematics
and selfesteem
from 70 school sites by means of 5 explanatory variables.
1 |
A data frame with 70 observations on the following 8 variables.
education
education level of mother as measured in terms of percentage of high school graduates among female parents
occupation
highest occupation of a family member according to a pre-arranged rating scale
visit
parental visits index representing the number of visits to the school site
counseling
parent counseling index calculated from data on time spent with child on school-related topics such as reading together, etc.
teacher
number of teachers at a given site
reading
total reading score as measured by the Metropolitan Achievement Test
mathematics
total mathematics score as measured by the Metropolitan Achievement Test
selfesteem
Coopersmith Self-Esteem Inventory, intended as a measure of self-esteem
This dataset was shamelessly borrowed from the FRB
package.
The relationships among these variables are unusual, a fact only revealed by plotting.
A. Charnes, W.W. Cooper and E. Rhodes (1981). Evaluating Program and Managerial Efficiency: An Application of Data Envelopment Analysis to Program Follow Through. Management Science, 27, 668-697.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | data(schooldata)
# initial screening
plot(schooldata)
# better plot
library(corrgram)
corrgram(schooldata, lower.panel=panel.ellipse, upper.panel=panel.pts)
#fit the MMreg model
school.mod <- lm(cbind(reading, mathematics, selfesteem) ~
education + occupation + visit + counseling + teacher, data=schooldata)
# shorthand
school.mod <- lm(cbind(reading, mathematics, selfesteem) ~ ., data=schooldata)
Anova(school.mod)
heplot(school.mod)
heplot3d(school.mod)
# robust model, using robmlm()
school.rmod <- robmlm(cbind(reading, mathematics, selfesteem) ~ ., data=schooldata)
# note that counseling is now significant
Anova(school.rmod)
# compare classical HEplot with robust
heplot(school.mod, cex=1.4, lty=1, fill=TRUE, fill.alpha=0.1)
heplot(school.rmod, add=TRUE, error.ellipse=TRUE, lwd=c(2,2), lty=c(2,2),
term.labels=FALSE, err.label="", fill=TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.