Learn R Programming

R2MLwiN (version 0.8-9)

Running 'MLwiN' from Within R

Description

An R command interface to the 'MLwiN' multilevel modelling software package.

Copy Link

Version

Install

install.packages('R2MLwiN')

Monthly Downloads

285

Version

0.8-9

License

GPL (>= 2)

Maintainer

Zhengzheng Zhang

Last Published

January 30th, 2024

Functions in R2MLwiN (0.8-9)

coef,mlwinfitIGLS-method

Extract the coefficient vector from "mlwinfitIGLS" objects
coef,mlwinfitMCMC-method

Extract the coefficient vector from "mlwinfitMCMC" objects
caterpillar

Draws a caterpillar plot (in MLwiN style).
caterpillarR

Draws caterpillar plots of the residuals from a mlwinfitIGLS-class or mlwinfitMCMC-class object, at a chosen level of the multilevel model.
coef.mlwinfitIGLS

Extract the coefficient vector from "mlwinfitIGLS" objects
diag1

Examination dataset
df2matrix

Translates a data.frame, formatted for use in multiple membership modelling in MLwiN, to a matrix.
double2singlePrecision

Converts numerical values from double precision to single precision.
df.residual.mlwinfitIGLS

Returns the residual degrees-of-freedom extracted from "mlwinfitIGLS" objects.
fysio

Data on physiotherapy referrals from 100 general practices in the Netherlands, collected in 1987
fitted.mlwinfitMCMC

Returns the fitted values from "mlwinfitMCMC" objects.
fitted.mlwinfitIGLS

Returns the fitted values from "mlwinfitIGLS" objects.
coef.mlwinfitMCMC

Extract the coefficient vector from "mlwinfitMCMC" objects
gcsecomp1

Pupils' marks from GCSE exams (UK, 1989); complete cases only.
glance.mlwinfitMCMC

Extract GOF measures from a statistical object (broom package).
height

Height data.
glance.mlwinfitIGLS

Extract GOF measures from a statistical object (broom package).
getSummary.mlwinfitMCMC

Extract coefficients and GOF measures from a statistical object (memisc package).
deviance.mlwinfitIGLS

Returns the deviance from "mlwinfitIGLS" objects.
cvd

Data from the 1998 Scottish Health Survey on cardiovascular disease status of 8804 respondents
bes83

Subsample from British Election Study, '83.
bang1

Sub-sample from the 1989 Bangladesh Fertility Survey
[,mlwinfitMCMC,ANY,ANY,ANY-method

Extract or Replace parts of "mlwinfitMCMC" objects
[,mlwinfitIGLS,ANY,ANY,ANY-method

Extract or Replace parts of "mlwinfitIGLS" objects
logLik,mlwinfitIGLS-method

Returns the log-likelihood from "mlwinfitIGLS" objects.
gcsemv1

Pupils' marks from GCSE exams (UK, 1989).
logLik.mlwinfitIGLS

Returns the log-likelihood from "mlwinfitIGLS" objects.
formula.mlwinfitIGLS

"mlwinfitIGLS" model formula
formula.mlwinfitMCMC

"mlwinfitMCMC" model formula
mlwin2bugs

This function captures output files from MLwiN for estimation in WinBUGS/OpenBUGS.
extract,mlwinfitMCMC-method

Extract coefficients and GOF measures from a statistical object.
extract,mlwinfitIGLS-method

Extract coefficients and GOF measures from a statistical object (texreg package).
matrix2df

For multiple membership models, translates matrix into a data.frame formatted for MLwiN Translates a matrix into a form usable by MLwiN for multiple membership models, namely a data.frame with (a) columns containing membership IDs (if first row matrix is 0 1 1 0 1 1, then first row of generated ID vectors would be, say, 2, 3, 5, 6) and (b) columns containing weights (in this example, if standardise = TRUE, then first row of generated weight vectors would be, say, 0.25, 0.25, 0.25, 0.25, otherwise first row of generated weight vectors would be, say, 1, 1, 1, 1).
predict.mlwinfitMCMC

Returns the predicted data from "mlwinfitMCMC" objects.
print.mlwinfitIGLS

Summarize "mlwinfitIGLS" objects
print.mlwinfitMCMC

Summarize "mlwinfitMCMC" objects
getSummary.mlwinfitIGLS

Extract coefficients and GOF measures from a statistical object (memisc package).
mlwinfitMCMC-class

An S4 class that stores the outputs of the fitted MCMC model.
mlwinfitIGLS-class

An S4 class that stores the outputs of the fitted IGLS model.
show,mlwinfitIGLS-method

Show objects of class "mlwinfitIGLS"
residuals.mlwinfitIGLS

Returns the residual data from "mlwinfitIGLS" objects.
runMLwiN

Calls MLwiN from R.
prior2macro

Translates informative prior information into a concise MLwiN macro.
predLines

Draws predicted lines using a fitted model object
hungary1

Hungarian component of 2nd International Science Survey, '84; see Goldstein 2003
sixway

Draws a sixway plot of MCMC diagnostics.
nobs.mlwinfitIGLS

Returns the number of used observations from "mlwinfitIGLS" objects.
show.mlwinfitMCMC

Summarize "mlwinfitMCMC" objects
predict.mlwinfitIGLS

Returns the predicted data from "mlwinfitIGLS" objects.
trajectories

Plots MCMC chain trajectories
residuals.mlwinfitMCMC

Returns the residual data from "mlwinfitMCMC" objects.
mmmec

EC data on UV radiation exposure & malignant melanoma.
jspmix1

Dataset of pupils' test scores, a subset of the Junior School Project.
summary.mlwinfitIGLS

Summarize "mlwinfitIGLS" objects
tidy.mlwinfitMCMC

Summarises information about the components of a model from a statistical object (broom package).
summary,mlwinfitIGLS-method

Summarize "mlwinfitIGLS" objects
tidy.mlwinfitIGLS

Summarises information about the components of a model from a statistical object (broom package).
show,mlwinfitMCMC-method

Show objects of class "mlwinfitMCMC"
tutorial

Exam results for six inner London Education Authorities
lips1

Lips data
summary.mlwinfitMCMC

Summarize "mlwinfitMCMC" objects
show.mlwinfitIGLS

Summarize "mlwinfitIGLS" objects
predCurves

Draws predicted curves (lines) using estimates from the fixed part of a fitted model.
nobs.mlwinfitMCMC

Returns the number of used observations from "mlwinfitMCMC" objects.
lmdp

Details of deaths from all causes in England and Wales 1972-1992, taken from the local mortality datapack
xc

Examination scores of 16-year olds in Fife, Scotland.
rats

Weights of 30 rats, measured weekly over 5 weeks.
update.mlwinfitIGLS

Update "mlwinfitIGLS" objects
update.mlwinfitMCMC

Update "mlwinfitMCMC" objects
update,mlwinfitIGLS-method

Update "mlwinfitIGLS" objects
reading1

Students' reading attainment in inner London infant schools.
vcov,mlwinfitIGLS-method

Extract the approximate variance-covariance matrix from "mlwinfitIGLS" objects
vcov,mlwinfitMCMC-method

Extract the approximate variance-covariance matrix from "mlwinfitMCMC" objects
xc1

Examination scores of 16-year olds in Fife, Scotland.
ws2foreign

Converts data from one format to another within MLwiN
update,mlwinfitMCMC-method

Update "mlwinfitMCMC" objects
write.MCMC

Writes MLwiN macros to fit models using Markov chain Monte Carlo (MCMC) methods
vcov.mlwinfitMCMC

Extract the approximate variance-covariance matrix from "mlwinfitMCMC" objects
vcov.mlwinfitIGLS

Extract the approximate variance-covariance matrix from "mlwinfitIGLS" objects
summary,mlwinfitMCMC-method

Summarize "mlwinfitMCMC" objects
wage1

Simulated dataset of office workers' salary and other employment details.
write.IGLS

Writes MLwiN macros to fit models using the iterative generalized least squares (IGLS) algorithm.
Formula.translate.compat

An internal function, allowing back-compatibility, which translates a model formula from a formula object or character string into an R list object.
alevchem

Chemistry A-level results from one exam board
Untoggle

Converts a categorical variable into several separate binary variables
augment.mlwinfitIGLS

Augment data frame with information derived from the model fit (broom package).
Formula.translate

An internal function to translate an R formula into an R list object.
BD

Calculates Brooks-Draper diagnostic
augment.mlwinfitMCMC

Augment data frame with information derived from the model fit (broom package).
MCSE

Calculates the estimated Monte Carlo standard error (MCSE)
R2MLwiN-package

Running MLwiN from within R
bang

Sub-sample from the 1989 Bangladesh Fertility Survey (see Huq & Cleveland, 1990)