generate_data {silp} | R Documentation |
generate_data
Description
Generates data based on the simulation settings provided by Cheung et al. (2021). Note that the reliability used here is omega.
Usage
generate_data(
n_obs = 100,
corr = 0.3,
effect = 0.42,
ld = c(1, 1, 1, 1),
alp = 0.9,
effect_x = 0.4,
effect_z = 0.2
)
Arguments
n_obs |
Integer. The number of observations. |
corr |
Numeric. The correlation of the latent variables. |
effect |
Numeric. The effect of the moderator. |
ld |
Numeric. The factor loading of the latent variable to its indicators. |
alp |
Numeric. The reliability of the latent variable. |
effect_x |
Numeric. The direct effect of x. |
effect_z |
Numeric. The direct effect of z. |
Value
A dataset simulated from the argument settings.
Examples
n_obs = 100
corr = 0.1
effect = 0.12
ld = c(1,1,1,1)
alp = 0.9
generate_data(n_obs, corr, effect, ld, alp)
[Package silp version 1.0.3 Index]