# \donttest{
data_mat <- matrix(NA, nrow = 100, ncol = 1)
betas <- c(rep(0.45, 25),rep(0.14,75))
inf_times <- sim_epi_data(10000, 10, 100, betas, 1/8)
inf_times_vec <- rep(0,100)
names(inf_times_vec) <- as.character(1:100)
for(j in 1:100){
if(as.character(j) %in% names(table(floor(inf_times)))){
inf_times_vec[j] = table(floor(inf_times))[which(names(table(floor(inf_times))) == j)]
}
}
data_mat[,1] <- inf_times_vec
out <- detect_cp_epi(data = data_mat, n_iterations = 250, q = 0.5,
xi = 1/8, a0 = 40, b0 = 10, M = 250)
# }
Run the code above in your browser using DataLab