# Define population parameters for lagged effects
Phi <- matrix(c(.4, .1, .2, .3), ncol = 2, byrow = TRUE)
# Create and save Mplus model syntax
powRICLPM_Mplus(
sample_size = c(400, 500),
time_points = 3,
ICC = 0.5,
RI_cor = 0.3,
Phi = Phi,
within_cor = 0.3,
reps = 10000,
seed = 1234,
save_path = tempdir()
)
# \dontshow{
unlink(file.path(tempdir(), c("Mplus_N400_T3_ICC0.5.txt", "Mplus_N500_T3_ICC0.5.txt")))
# }
Run the code above in your browser using DataLab