data.table::setDTthreads(2) #only needed for CRAN checks
theta_init <- data.frame(
alpha1 = c(0.5, 1),
beta1 = c(0.5, 1),
alpha2 = c(2, 3),
beta2 = c(2, 3),
p = c(0.1, 0.2)
)
data(caers)
proc <- processRaw(caers)
squashed <- squashData(proc, bin_size = 300, keep_pts = 10)
squashed <- squashData(squashed, count = 2, bin_size = 13, keep_pts = 10)
theta_hat <- autoHyper(data = squashed, theta_init = theta_init)$estimates
qn <- Qn(theta_hat, N = proc$N, E = proc$E)
proc$QUANT_05 <- quantBisect(percent = 5, theta = theta_hat, N = proc$N,
E = proc$E, qn = qn)
if (FALSE) proc$QUANT_95 <- quantBisect(percent = 95, theta = theta_hat,
N = proc$N, E = proc$E, qn = qn)
head(proc)
Run the code above in your browser using DataLab