| sim_ICED | R Documentation |
sim_ICED simulates n x p data frame based on ICED model structure, selected variance components, and specified n
sim_ICED(structure, variances, n, check_recovery = FALSE)
structure |
data.frame describing the structure of the data, with each variable covering a design aspect - see example. Note: currently the first variable must be time and include a different value for each repeated measure. |
variances |
list of variances corresponding to each latent variable specified in strucutre |
n |
number of participants to simulate |
check_recovery |
runs run_ICED to extract variance components in order to check the variance parameter recovery |
list including simulated data
# compare recovery of variance parameters
# ICED structure
struc <- data.frame(time = c("T1", "T2", "T3", "T4"),
day = c("day1","day1","day2","day2"),
session = c("ses1", "ses1","ses2", "ses3"))
sim_ICED(struc,
variances = list(time = 10,
day = 2,
session = 1,
error = 3),
n = 20,
check_recovery = TRUE)
sim_ICED(struc,
variances = list(time = 10,
day = 2,
session = 1,
error = 3),
n = 2000,
check_recovery = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.