Learn R Programming

R2MLwiN (version 0.1-7)

wage1: Simulated dataset of office workers' salay and other employment details.

Description

A simulated dataset of office workers' salary (and associated information) in which workers exhibit multiple membership of companies worked for over past year.

Arguments

source

Browne, W. J. (2012) MCMC Estimation in MLwiN Version 2.26. University of Bristol: Centre for Multilevel Modelling. Rasbash, J., Browne, W. J., Healy, M., Cameron, B., Charlton, C. M. J. (2013) MLwiN v2.27. University of Bristol: Centre for Multilevel Modelling.

Details

The simulated wage1 dataset is one of the sample datasets provided with the multilevel modelling software package MLwiN (Rasbash et al., 2013). It consists of salary and associated information for office workers, and is used by Browne (2012) as an example of modelling a multiple membership structure. The dataset exhibits multiple membership in that workers are clustered across the companies employing them over the past year, but some have worked for more than one company during that time.)

Examples

Run this code
# NB: change path as appropriate
MLwiN <- "C:/Program Files (x86)/MLwiN v2.27/"
data(wage1)
# fit age_40 and numjobs as fixed effects, with random effects for companies, 
# in multiple membership model
F1 = "logearn ~ (0|cons + age_40 + numjobs) + (1|cons) + (2|cons)"
ID = c("company", "id")
OurMultiMemb <- list("class" = 2, "N1" = 4, "weight" = "weight1", "id" = NA)
(MMembModel <- runMLwiN(Formula = F1, levID = ID, indata = wage1, 
estoptions = list(EstM = 1, xclass = OurMultiMemb, notation = "class"), MLwiNPath = MLwiN))

Run the code above in your browser using DataLab