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 toobs_opts()
.- dates
A vector of dates used to calculate the day of the week.
Examples
if (FALSE) { # \dontrun{
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 = Normal(mean = 0.4, sd = 0.01)), dates = dates
)
# Apply a custom week week length
create_obs_model(obs_opts(week_length = 3), dates = dates)
} # }