simulate_zero_inflated_beta_random_effect_data {ZIBR} | R Documentation |
Simulate data according to zero-inflated beta random effects model
Description
Simulate data according to zero-inflated beta random effects model
Usage
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
)
Arguments
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 |
Value
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
Examples
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
)