Important differences between version 0.8-0 and earlier versions
A number of wide-ranging changes, including a new model-fitting syntax more
in keeping with that conventionally used in R, were introduced in
R2MLwiN version 0.8-0. The demos, which replicate both the User's Guide to MLwiN (Rasbash et al, 2012) and
MCMC Estimation in MLwiN (Browne, 2012) manuals, provide practical demonstrations of many
of these changes. See demo(package = "R2MLwiN") for a list of demo titles; to run one
type e.g. demo(UserGuide03) or view a demo's script via
file.show(system.file("demo", "UserGuide03", package = "R2MLwiN")).
- The Formula is now specified via a
formula object (with some differences
in specification: see runMLwiN). So, for example,
previously a 2-level model random intercept model would be specified by e.g.
normexam ~ (0|cons + standlrt) + (2|cons) + (1|cons), levID = c('school', 'student'),
with normexam the response variable, cons a constant of ones forming the intercept,
which is allowed to vary at level 1 (student) and level 2 (school), and
standlrt included as a predictor in the fixed part of the model. Whilst back-compatibility
is preserved (i.e. this specification will currently still work) the same model can now be more
parsimoniously specified via normexam ~ 1 + standlrt + (1 | school) + (1 | student).
As well examples in the demos, see runMLwiN and Formula.translate for further info.
- As a means of specifying cross-classified, multiple membership or CAR models,
xclass is now deprecated.
Instead, cross-classified models are specified via xc = TRUE, multiple
membership models are specified via mm, and CAR models are specified via car,
in the list of estoptions. mm and car can be a list of
variable names, a list of vectors, or a matrix. See runMLwiN for further details.
- Multiple membership/CAR information can now be specified using matrices.
df2matrix and matrix2df functions have also been added to convert such
information between data.frame and matrix formats.
- As a means of specifying common (i.e. the same for each category) or separate (i.e. one for each
category) coefficients in ordered multinomial
and multivariate response models,
c (for common) and s (for separate) have been
replaced by the employment of square brackets after the relevant variable to indicate a common
coefficient is to be fitted (a separate coefficient will be fitted otherwise). Within these square
brackets needs to be placed a numeric identifier indicating the responses for which a common coefficient
is to be added (see runMLwiN for further details). E.g. what would have been previously
specified, within the Formula object, as ... (0s|cons + ravens) + (0c|fluent{1, 0}) ... would now be specified by
... 1 + ravens + fluent[1] ....
- When added as a predictor, a variable encoded as a
factor is automatically
handled as categorical, replacing the previous use of square brackets after the variable name.
- A number of generic s4 methods have been added to improve compatibility with statistical functions
which use them (e.g. see
stats4-package). So, for example, the addition of
a logLik means a likelihood ratio test can now be conducted
on two mlwinfitIGLS-class objects using the lrtest function,
e.g. lrtest(mymodel1, mymodel2). See help(package = "R2MLwiN") for
the index listing these various methods.
References
MLwiN software and manuals
Browne, W.J. (2012) MCMC Estimation in MLwiN, v2.26.
Centre for Multilevel Modelling, University of Bristol. Rasbash, J., Charlton, C., Browne, W.J., Healy, M. and Cameron, B. (2009)
MLwiN Version 2.1. Centre for Multilevel Modelling, University of Bristol. Rasbash, J., Charlton, C. and Pillinger, R. (2012) Manual Supplement to
MLwiN v2.26. Centre for Multilevel Modelling, University of Bristol. Rasbash, J., Steele, F., Browne, W.J. and Goldstein, H. (2012)
A User's Guide to MLwiN Version 2.26. Centre for Multilevel Modelling,
University of Bristol. OpenBUGS
Thomas, A., O'Hara, B., Ligges, U. and Sturtz, S. (2006) Making BUGS Open.
R News, 6, 12:17. WinBUGS
Spiegelhalter, D.J., Thomas, A. and Best, N.G. (1999) WinBUGS Version 1.2
User Manual. MRC Biostatistics Unit.