Skip to contents

For more details see the help vignette.: vignette("nowcast", package="attrib")

Usage

nowcast_correction_sim_neg_bin(
  nowcast_correction_object,
  offset,
  n_sim = 500,
  date_0
)

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.

Value

simulations of the estimate made by the fitted models in nowcast_correction_fn

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)
}