# Simulate with default parameters (2 RE model)
sim_data <- simulate_hurdle_data(n_subjects = 100, seed = 123)
head(sim_data)
# Simulate with custom prices
apt_prices <- c(0, 0.25, 0.5, 1, 1.5, 2, 2.5, 3, 4, 5, 6, 7, 8, 9, 10)
sim_apt <- simulate_hurdle_data(n_subjects = 100, prices = apt_prices, seed = 123)
# Simulate with custom parameters (Q0 = 15, alpha = 0.1)
sim_custom <- simulate_hurdle_data(
n_subjects = 100,
log_q0 = log(15),
alpha = 0.1,
seed = 123
)
# Simulate 3 RE model
sim_3re <- simulate_hurdle_data(
n_subjects = 100,
n_random_effects = 3,
sigma_c = 0.1,
seed = 456
)
Run the code above in your browser using DataLab