wage1: Simulated dataset of office workers' salary and other...

wage1R Documentation

Simulated dataset of office workers' salary 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.

Usage

wage1

Format

A data frame with 3022 observations on the following 21 variables:

id

Unique office worker identifying code.

company

Identifying code for company worked for over the last 12 months.

company2

If worked for >1 company over the last 12 months, identifying code for second company.

company3

If worked for >2 companies over the last 12 months, identifying code for third company.

company4

If worked for >3 companies over the last 12 months, identifying code for fourth company.

age

Age of worker.

parttime

Part or full-time, a factor with levels Fulltime and Parttime.

sex

Sex of worker, a factor with levels male and female.

cons

A column of ones. If included as an explanatory variable in a regression model (e.g. in MLwiN), its coefficient is the intercept.

earnings

Workers' earnings over the last financial year.

logearn

Workers' (natural) log-transformed earnings over the last financial year.

numjobs

The number of companies worked for over the last 12 months.

weight1

Proportion of time worked for employer listed in company.

weight2

Proportion of time worked for employer listed in company2.

weight3

Proportion of time worked for employer listed in company3.

weight4

Proportion of time worked for employer listed in company4.

ew1

Alternative (equal) weighting for company (1/numjobs).

ew2

Alternative (equal) weighting for company2 (if numjobs >1 then 1/numjobs, else 0).

ew3

Alternative (equal) weighting for company3 (if numjobs >2 then 1/numjobs, else 0).

ew4

Alternative (equal) weighting for company4 (if numjobs >3 then 1/numjobs, else 0).

age_40

Age of worker, centered on 40 years.

Details

The simulated wage1 dataset is one of the sample datasets provided with the multilevel modelling software package MLwiN (Rasbash et al., 2009), and described in Browne (2012). 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.)

Source

Browne, W. J. (2012) MCMC Estimation in MLwiN Version 2.26. University of Bristol: Centre for Multilevel Modelling.

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(wage1, package = "R2MLwiN")

(mymodel <- runMLwiN(logearn ~ 1 + age_40 + numjobs + (1 | company) + (1 | id), 
  estoptions = list(EstM = 1, 
  mm = list(list(mmvar = list("company", "company2", "company3", "company4"),
  weights = list("weight1", "weight2", "weight3", "weight4")), NA)),
  data = wage1))


## End(Not run)


R2MLwiN documentation built on May 29, 2024, 2:10 a.m.