Spark Online Training by Edureka

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

Description Usage Format Details Source See Also Examples

Description

A simulated data example from Aguinis and Culpepper (2015) 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 (2015) for the model used to simulate the dataset.

Source

Aguinis, H., & Culpepper, S.A. (2015). An expanded decision making procedure for examining cross-level interaction effects with multilevel modeling. Organizational Research Methods. Available at: http://www.hermanaguinis.com/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)


Search within the iccbeta package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.