env.two {macc} | R Documentation |
Simulated two-level dataset
Description
"env.three" is an R environment containing a data list generated from 50 subjects, and the parameter settings used to generate the data.
Usage
data("env.two")
Format
An R environment.
data2
a list of length 50, each contains a data frame with 3 variables.
Theta
a 2 by 2 matrix, which is the population level model coefficients.
Sigma
the covariance matrix of the model error terms for the single level model.
n
a 50 by 1 matrix, is the number of trials for each subject.
Lambda
the covariance matrix of the model errors in the coefficient regression model.
A
a vector of length 50, is the
A
value in the single-level for each subject each session.B
a vector of length 50, is the
B
value in the single-level for each subject each session.C
a vector of length 50, is the
C
value in the single-level for each subject each session.
Details
The number of subjects is N = 50
. For each subject, the number of trials is a random draw from a Poisson distribution with mean 100. The population level coefficients are set to be A = 0.5
, C = 0.5
and B = -1
, and the variances of the model errors are \sigma_{1_{i}}^2 = 1
, \sigma_{2_{i}}^2 = 4
and the correlation is \delta = 0.5
. See Section 5.2 of the reference for details. This is a special case of the three-level data with K=1
.
References
Zhao, Y., & Luo, X. (2014). Estimating Mediation Effects under Correlated Errors with an Application to fMRI. arXiv preprint arXiv:1410.7217.
Examples
data(env.two)
dt<-get("data2",env.two)