bets.inference( data, likelihood = c("conditional","unconditional"), ci = c("lrt","point","bootstrap"), M =Inf, r =NULL, L =NULL, level =0.95, bootstrap =1000, mc.cores =1)
Arguments
data: A data.frame with three columns: B, E, S.
likelihood: Conditional on B and E?
ci: How to compute the confidence interval?
M: Right truncation for symptom onset (only available for conditional likelihood)
r: Parameter for epidemic growth (overrides {params}, only available for conditional likelihood)
L: Time of travel restriction (required for unconditional likelihood)
level: Level of the confidence interval (default 0.95).
bootstrap: Number of bootstrap resamples.
mc.cores: Number of cores used for computing the bootstrap confidence interval.
Returns
Results of the likelihood inference, including maximum likelihood estimators and individual confidence intervals for the model parameters based on inverting the likelihood ratio test.
Details
The confidence interval is either not computed ("point"), or computed by inverting the likelihood ratio test ("lrt") or basic bootstrap ("bootstrap")
Examples
data(wuhan_exported)data <- subset(wuhan_exported, Location =="Hefei")data$B <- data$B -0.75data$E <- data$E -0.25data$S <- data$S -0.5# Conditional likelihood inferencebets.inference(data,"conditional")bets.inference(data,"conditional","bootstrap", bootstrap =100, level =0.5)# Unconditional likelihood inferencebets.inference(data,"unconditional", L =54)# Conditional likelihood inference for data with right truncationbets.inference(subset(data, S <=60),"conditional", M =60)# Conditional likelihood inference with r fixed at 0 (not recommended)bets.inference(data,"conditional", r =0)