Learn R Programming

iccbeta (version 1.0)

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

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

data(simICCdata)

Arguments

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.

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

Details

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

See Also

lmer, model.matrix, VarCorr, LRTSim, Hofmann

Examples

Run this code
## 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)

Run the code above in your browser using DataLab