## simulate some data
sim <- 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))),
Z = 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
)
## run zibr on the simulated data
zibr_fit <- zibr(
logistic_cov = sim$X, beta_cov = sim$Z, Y = sim$Y,
subject_ind = sim$subject_ind, time_ind = sim$time_ind
)
zibr_fit
Run the code above in your browser using DataLab