bets.inference {bets.covid19} | R Documentation |
Likelihood inference
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 )
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 |
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. |
The confidence interval is either not computed ("point"
), or computed by inverting the likelihood ratio test ("lrt"
) or basic bootstrap ("bootstrap"
)
Results of the likelihood inference, including maximum likelihood estimators and individual confidence intervals for the model parameters based on inverting the likelihood ratio test.
data(wuhan_exported) data <- subset(wuhan_exported, Location == "Hefei") data$B <- data$B - 0.75 data$E <- data$E - 0.25 data$S <- data$S - 0.5 # Conditional likelihood inference bets.inference(data, "conditional") bets.inference(data, "conditional", "bootstrap", bootstrap = 100, level = 0.5) # Unconditional likelihood inference bets.inference(data, "unconditional", L = 54) # Conditional likelihood inference for data with right truncation bets.inference(subset(data, S <= 60), "conditional", M = 60) # Conditional likelihood inference with r fixed at 0 (not recommended) bets.inference(data, "conditional", r = 0)