Nowcast simmulation function when nowcast_correction_fn_negbin is used for correction.
Source:R/nowcast_expand.R
nowcast_correction_sim_neg_bin.Rd
For more details see the help vignette.:
vignette("nowcast", package="attrib")
Arguments
- nowcast_correction_object
object returned from function nowcast_correction_fn_expanded
- offset
Boolian value which is set to true if offset(log(pop)) is a part of the formula
- n_sim
Number of simulations
- date_0
Date of aggregation.
Examples
if (FALSE) {
data <- data.table::as.data.table(data_fake_nowcasting_county_aggregated)
n_week_adjusting <- 6
date_0 <- data[nrow(data),]$cut_doe #last date in the dataset, assume the dataset is ordered.
data <- data[cut_doe >= (date_0 - n_week_start*7 + 1), ]
nowcast_correction_object <- nowcast_correction_fn_negbin_mm(data, n_week_adjusting,
offset = "log(pop)" , date_0 = date_0)
nowcast_sim <- nowcast_correction_sim_neg_bin(nowcast_correction_object,
offset = "log(pop)", date_0 = date_0)
}