powered by
Generates data based on the simulation settings provided by Cheung et al. (2021). Note that the reliability used here is omega.
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 )
A dataset simulated from the argument settings.
Integer. The number of observations.
Numeric. The correlation of the latent variables.
Numeric. The effect of the moderator.
Numeric. The factor loading of the latent variable to its indicators.
Numeric. The reliability of the latent variable.
Numeric. The direct effect of x.
Numeric. The direct effect of z.
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)
Run the code above in your browser using DataLab