Learn R Programming

R2MLwiN (version 0.1-7)

mlwinfitIGLS-class: S4 class: mlwinfitIGLS

Description

This S4 class object is used to save the outputs from the fitted multilevel model using IGLS.

Arguments

An instance of the Class

An instance is created by calling function runMLwiN.

See Also

runMLwiN

Examples

Run this code
library(R2MLwiN)
## Modify the following paths as appropriate.
## MLwiN folder
mlwin ="C:/Program Files (x86)/MLwiN v2.27/"
## MLwiN sample worksheet folder
wspath=paste(mlwin,"/samples/",sep="")

## MLwiN sample worksheet: tutorial dataset
wsfile=paste(wspath,"tutorial.ws",sep="");inputfile=paste(tempdir(),"/tutorial.dta",sep="")
ws2foreign(wsfile, foreignfile=inputfile, MLwiNPath=mlwin)
library(foreign);indata =read.dta(inputfile)

## Define the model
formula="normexam~(0|cons+standlrt)+(2|cons+standlrt)+(1|cons)"
levID=c('school','student')
## Choose option(s) for inference
estoptions= list(EstM=0)
## Fit the model
mymodel=runMLwiN(formula, levID, D="Normal", indata, estoptions, MLwiNPath=mlwin)

##summary method
summary(mymodel)

##get method
mymodel["LIKE"]

Run the code above in your browser using DataLab