View source: R/simulate_zero_inflated_beta_data.R
simulate_zero_inflated_beta_random_effect_data | R Documentation |
Simulate data according to zero-inflated beta random effects model
simulate_zero_inflated_beta_random_effect_data(
subject_n = 50,
time_n = 5,
v = 2,
alpha = as.matrix(c(0, 0.5, -1)),
beta = as.matrix(c(-0.5, -0.5, 0.5)),
X = NA,
Z = NA,
s1 = 0.2,
s2 = 0.2,
sim_seed = 100
)
subject_n |
number of subjects |
time_n |
number of time points for each subject |
v |
the dispersion parameter in beta component |
alpha |
the coefficients in logistic component |
beta |
the coefficients in beta component |
X |
the covariates in logistic component |
Z |
the covariates in beta component |
s1 |
the stardard deviation of random effect in logistic component |
s2 |
the stardard deviation of random effect in beta component |
sim_seed |
the random seed |
a named list
Y the bacterial abundance generated from the model
X the covariates in logistic component
Z the covariates in beta component
alpha the coefficients in logistic component
beta the coefficients in beta component
s1 the stardard deviation of random effect in logistic component
s2 the stardard deviation of random effect in beta component
subject_ind the IDs for each subject
time_ind time points
simulate_zero_inflated_beta_random_effect_data(
subject_n = 100, time_n = 5,
X = as.matrix(c(rep(0, 50 * 5), rep(1, 50 * 5))),
alpha = as.matrix(c(-0.5, 1)),
beta = as.matrix(c(-0.5, 0.5)),
s1 = 1, s2 = 0.8,
v = 5,
sim_seed = 100
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.