obs_opts | R Documentation |
Defines a list specifying the structure of the observation model. Custom settings can be supplied which override the defaults.
obs_opts(
family = c("negbin", "poisson"),
phi = Normal(mean = 0, sd = 0.25),
weight = 1,
week_effect = TRUE,
week_length = 7,
scale = Fixed(1),
na = c("missing", "accumulate"),
likelihood = TRUE,
return_likelihood = FALSE
)
family |
Character string defining the observation model. Options are Negative binomial ("negbin"), the default, and Poisson. |
phi |
A |
weight |
Numeric, defaults to 1. Weight to give the observed data in the log density. |
week_effect |
Logical defaulting to |
week_length |
Numeric assumed length of the week in days, defaulting to 7 days. This can be modified if data aggregated over a period other than a week or if data has a non-weekly periodicity. |
scale |
A |
na |
Deprecated; use the |
likelihood |
Logical, defaults to |
return_likelihood |
Logical, defaults to |
An <obs_opts>
object of observation model settings.
# default settings
obs_opts()
# Turn off day of the week effect
obs_opts(week_effect = TRUE)
# Scale reported data
obs_opts(scale = Normal(mean = 0.2, sd = 0.02))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.