data <- data.frame(
delay = c(1, 2, 3),
delay_upper = c(2, 3, 4),
n = c(10, 20, 15),
pwindow = c(1, 1, 2),
relative_obs_time = c(10, 10, 10)
)
stan_data <- pcd_as_stan_data(
data,
dist_id = 1,
primary_id = 1,
param_bounds = list(lower = c(0, 0), upper = c(10, 10)),
primary_param_bounds = list(lower = numeric(0), upper = numeric(0)),
priors = list(location = c(1, 1), scale = c(1, 1)),
primary_priors = list(location = numeric(0), scale = numeric(0))
)
Run the code above in your browser using DataLab