View source: R/generate_data.R
generate_data | R Documentation |
Generates data based on the simulation settings provided by Cheung et al. (2021). Note that the reliability used here is omega.
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
)
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. |
A dataset simulated from the argument settings.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.