bball1970Player Player's last name
Hits Number of hits in the first 45 at-bats of the season
AB Number of at-bats (45 for all players)
RemainingAB Number of remaining at-bats (different for most players)
RemainingHits Number of remaining hits
bball2006y Number of hits
K Number of at-bats
kidiqkid_score Child's IQ score
mom_hs Indicator for whether the mother has a high school degree
mom_iq Mother's IQ score
mom_age Mother's age
mortalityy Number of deaths
K Number of surgeries
radonlog_radon Radon measurement from the house (log scale)
log_uranium Uranium level in the county (log scale)
floor Indicator for radon measurement made on the first floor of
the house (0 = basement, 1 = first floor)
county County name (factor)
roachesy Number of roaches caught
roach1 Pretreatment number of roaches
treatment Treatment indicator
senior Indicator for only eldery residents in building
exposure2 Number of days for which the roach traps were used
tumorsy Number of rats with tumors
K Number of rats
wellsswitch Indicator for well-switching
arsenic Arsenic level in respondent's well
dist Distance (meters) from the respondent's house to the
nearest well with safe drinking water.
association Indicator for member(s) of household participate
in community organizations
educ Years of education (head of household)
Efron, B. and Morris, C. (1975) Data analysis using Stein's estimator and its generalizations. Journal of the American Statistical Association 70(350), 311--319.
Gelman, A. and Hill, J. (2007). Data Analysis Using Regression and Multilevel/Hierarchical Models. Cambridge University Press, Cambridge, UK. http://stat.columbia.edu/~gelman/arm/
Spiegelhalter, D., Thomas, A., Best, N., & Gilks, W. (1996) BUGS 0.5 Examples. MRC Biostatistics Unit, Institute of Public health, Cambridge, UK.
Tarone, R. E. (1982) The use of historical control information in testing for a trend in proportions. Biometrics 38(1):215--220.
fit <- stan_lm(kid_score ~ mom_hs * mom_iq, data = kidiq,
prior = R2(location = 0.30, what = "mean"),
# the next line is only to make the example go fast enough
chains = 2, iter = 500, seed = 12345)
pp_check(fit, nreps = 20)
Run the code above in your browser using DataLab