Simulated data example from Aguinis and Culpepper (in press).

Share:

Description

A simulated data example from Aguinis and Culpepper (in press) to demonstrate the icc_beta function for computing the proportion of variance in the outcome variable that is attributed to heterogeneity in slopes due to higher-order processes/units.

Usage

1

Format

A data frame with 900 observations (i.e., 30 observations nested within 30 groups) on the following 6 variables.

l1id

A within group ID variable.

l2id

A group ID variable.

one

A column of 1's for the intercept.

X1

A simulated level 1 predictor.

X2

A simulated level 1 predictor.

Y

A simulated outcome variable.

Details

See Aguinis and Culpepper (in press) for the model used to simulate the dataset.

Author(s)

Steven Andrew Culpepper, Herman Aguinis

Maintainer: Steven Andrew Culpepper <sculpepp@illinois.edu>

Source

Aguinis, H., & Culpepper, S.A. (in press). An expanded decision making procedure for examining cross-level interaction effects with multilevel modeling. Organizational Research Methods. Available at: http://mypage.iu.edu/~haguinis/pubs.html

See Also

lmer, model.matrix, VarCorr, LRTSim, Hofmann

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
## Not run: 
data(simICCdata)
  require(lme4)
  
  #computing icca
  vy = var(simICCdata$Y)
  lmm0 <- lmer(Y ~ (1|l2id),data=simICCdata,REML=F)
  VarCorr(lmm0)$l2id[1,1]/vy
    
  #Estimating random slopes model
  lmm1  <- lmer(Y~I(X1-m_X1)+I(X2-m_X2) +(I(X1-m_X1)+I(X2-m_X2)|l2id),data=simICCdata2,REML=F)
  X = model.matrix(lmm1)
  p=ncol(X)
  T1  = VarCorr(lmm1) $l2id[1:p,1:p]
  #computing iccb
  #Notice '+1' because icc_beta assumes l2ids are from 1 to 30.
  icc_beta(X,simICCdata2$l2id+1,T1,vy)$rho_beta

## End(Not run)