backnow_cm {linelistBayes} | R Documentation |
Get Bayesian Back-calculation Estimates and Model Diagnostics
Description
This function performs Bayesian back-calculation, imputation of missing delays, and nowcasting based on the provided data.
Usage
backnow_cm(
outcome,
days,
week,
weekend,
iter,
sigma,
maxdelay,
si,
size,
workerID,
printProgress,
cd = NULL
)
Arguments
outcome |
Vector of outcomes; difference between report and onset times |
days |
Vector of days when the report is given, aligned from the minimum report day |
week |
Vector indicating the week of the report, assumes no change within the week |
weekend |
Binary vector indicating if the outcome was reported during a weekend |
iter |
Number of iterations for the Bayesian back-calculation algorithm |
sigma |
The standard deviation for the normal distribution |
maxdelay |
The maximum delay parameter for the negative binomial distribution |
si |
Serial interval vector |
size |
The size parameter for the negative binomial distribution |
workerID |
Identifier for the parallel worker |
printProgress |
Flag to print the progress information |
cd |
second size parameter, unused |
Value
output A list object that contains the back-calculated estimates and model diagnostics
Examples
data("sample_onset_dates")
data("sample_report_dates")
line_list <- create_linelist(sample_report_dates, sample_onset_dates)
sip <- si(14, 4.29, 1.18)
results <- run_backnow(
line_list,
MAX_ITER = as.integer(2000),
norm_sigma = 0.5,
sip = sip,
NB_maxdelay = as.integer(20),
NB_size = as.integer(6),
workerID = 1,
printProgress = 1,
preCalcTime = TRUE)