jspmix1 {R2MLwiN} | R Documentation |
Dataset of pupils' test scores, a subset of the Junior School Project.
Description
An educational dataset of pupils' test scores, a subset of the Junior School Project (Mortimore et al., 1988).
Usage
jspmix1
Format
A data frame with 1119 observations on the following 8 variables:
- school
School identifying code.
- id
Pupil identifying code.
- sex
Sex of pupil; a factor with levels
female
andmale
.- fluent
Fluency in English indicator, where
0
= beginner,1
= intermediate,2
= fully fluent; measured in Year 1.- ravens
Test score, out of 40; measured in Year 1.
- english
Pupils' English test score, out of 100; measured in Year 3.
- behaviour
Pupils' behaviour score, where
lowerquarter
= pupil rated in bottom 25%, andupper
otherwise; measured in Year 3.- cons
A column of ones. If included as an explanatory variable in a regression model (e.g. in MLwiN), its coefficient is the intercept.
Details
A subset of the Junior School Project (Mortimore et al., 1988), the
jspmix1
dataset is one of the sample datasets provided with the
multilevel-modelling software package MLwiN (Rasbash et al., 2009), and is
used in Browne (2012) as an example of modelling mixed responses. It
consists of test scores for 1119 pupils across 47 schools. Note that the
behaviour
variable originally had three categories, and the middle
50% and top 25% have been combined to produce a binary variable.)
Source
Browne, W. J. (2012) MCMC Estimation in MLwiN Version 2.26. University of Bristol: Centre for Multilevel Modelling.
Mortimore, P., Sammons, P., Stoll, L., Lewis, D., Ecob, R. (1988) School Matters. Wells: Open Books.
Rasbash, J., Charlton, C., Browne, W.J., Healy, M. and Cameron, B. (2009) MLwiN Version 2.1. Centre for Multilevel Modelling, University of Bristol.
Examples
## Not run:
data(jspmix1, package = "R2MLwiN")
jspmix1$denomb <- jspmix1$cons
(mymodel <- runMLwiN(c(english, probit(behaviour, denomb)) ~
1 + sex + ravens + fluent[1] + (1 | school) + (1[1] | id),
D = c("Mixed", "Normal", "Binomial"),
estoptions = list(EstM = 1, mcmcMeth = list(fixM = 1, residM = 1, Lev1VarM = 1)),
data = jspmix1))
## End(Not run)