Learn R Programming

EpiNow2 (version 1.3.2)

obs_opts: Observation Model Options

Description

Defines a list specifying the structure of the observation model. Custom settings can be supplied which override the defaults.

Usage

obs_opts(family = "negbin", weight = 1, week_effect = TRUE, scale = list())

Arguments

family

Character string defining the observation model. Options are Negative binomial ("negbin"), the default, and Poisson.

weight

Numeric, defaults to 1. Weight to give the observed data in the log density.

week_effect

Logical defaulting to TRUE. Should a day of the week effect be used in the observation model.

scale

List, defaulting to an empty list. Should an scaling factor be applied to map latent infections (convolved to date of report). If none empty a mean (mean) and standard deviation (sd) needs to be supplied defining the normally distributed scaling factor.

Value

A list of observation model settings.

Examples

Run this code
# NOT RUN {
# default settings
obs_opts()

# Turn off day of the week effect
obs_opts(week_effect = TRUE)

# Scale reported data
obs_opts(scale = list(mean = 0.2, sd = 0.02))
# }

Run the code above in your browser using DataLab