View source: R/model-modules.R
enw_reference | R Documentation |
Reference date logit hazard reporting model module
enw_reference(
parametric = ~1,
distribution = c("lognormal", "none", "exponential", "gamma", "loglogistic"),
non_parametric = ~0,
data
)
parametric |
A formula (as implemented in |
distribution |
A character vector describing the parametric delay distribution to use. Current options are: "none", "lognormal", "gamma", "exponential", and "loglogistic", with the default being "lognormal". |
non_parametric |
A formula (as implemented in |
data |
Output from |
A list containing the supplied formulas, data passed into a list
describing the models, a data.frame
describing the priors used, and a
function that takes the output data and priors and returns a function that
can be used to sample from a tightened version of the prior distribution.
Model modules
enw_expectation()
,
enw_fit_opts()
,
enw_missing()
,
enw_obs()
,
enw_report()
# Parametric model with a lognormal distribution
enw_reference(
parametric = ~1, distribution = "lognormal",
data = enw_example("preprocessed")
)
# Non-parametric model with a random effect per delay
enw_reference(
parametric = ~ 0, non_parametric = ~ 1 + (1 | delay),
data = enw_example("preprocessed")
)
# Combined parametric and non-parametric model
enw_reference(
parametric = ~ 1, non_parametric = ~ 0 + (1 | delay_cat),
data = enw_example("preprocessed")
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.