Description Usage Arguments Examples
View source: R/cohortSimulation.R
Simulate fixed-slope, random-intercept longitudinal data
1 2 3 4 5 6 7 8 9 10 | simulateRandomInterceptModel(
n_subjects,
n_timepoints,
intercept_mean,
intercept_sd,
slope,
epsilon,
group = "",
id_prefix = ""
)
|
n_subjects |
Number of subjects |
n_timepoints |
Number of timepoints |
intercept_mean |
Mean random intercept |
intercept_sd |
Standard deviation of random intercept |
slope |
Slope |
epsilon |
Observation-level error |
group |
Character string defining group name |
id_prefix |
Character to append to ID variable |
1 2 3 4 5 6 7 8 9 | n_subjects <- 10
n_timepoints <- 4
intercept_mean <- 0
intercept_sd <- 0.01
slope <- -0.5
epsilon <- 0.01
group <- "testgroup"
id_prefix <- "test"
simulateRandomInterceptModel(n_subjects, n_timepoints, intercept_mean, intercept_sd, slope, epsilon, group, id_prefix)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.