Description Usage Arguments Details Value Examples
View source: R/likelihood_inference.R
Likelihood inference
1 2 3 4 5 6 7 8 9 10 11 |
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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.