create_obs_model {EpiNow2}R Documentation

Create Observation Model Settings

Description

[Stable] Takes the output of obs_opts() and converts it into a list understood by stan.

Usage

create_obs_model(obs = obs_opts(), dates)

Arguments

obs

A list of options as generated by obs_opts() defining the observation model. Defaults to obs_opts().

dates

A vector of dates used to calculate the day of the week.

Value

A list of settings ready to be passed to stan defining the Observation Model

Author(s)

Sam Abbott

See Also

obs_opts

Examples

dates <- seq(as.Date("2020-03-15"), by = "days", length.out = 15)
# default observation model data
create_obs_model(dates = dates)

# Poisson observation model
create_obs_model(obs_opts(family = "poisson"), dates = dates)

# Applying a observation scaling to the data
create_obs_model(
 obs_opts(scale = list(mean = 0.4, sd = 0.01)), dates = dates
)

# Apply a custom week week length
create_obs_model(obs_opts(week_length = 3), dates = dates)

[Package EpiNow2 version 1.4.0 Index]