update_secondary_args: Update estimate_secondary default priors

View source: R/estimate_secondary.R

update_secondary_argsR Documentation

Update estimate_secondary default priors

Description

[Stable] This functions allows the user to more easily specify data driven or model based priors for estimate_secondary() from example from previous model fits using a data.frame to overwrite other default settings. Note that default settings are still required.

Usage

update_secondary_args(data, priors, verbose = TRUE)

Arguments

data

A list of data and arguments as returned by create_stan_data().

priors

A data.frame of named priors to be used in model fitting rather than the defaults supplied from other arguments. This is typically useful if wanting to inform a estimate from the posterior of another model fit. Priors that are currently use to update the defaults are the scaling fraction ("frac_obs"), the mean delay ("delay_mean"), and standard deviation of the delay ("delay_sd"). The data.frame should have the following variables: variable, mean, and sd.

verbose

Logical, defaults to FALSE. Should verbose progress messages be returned.

Value

A list as produced by create_stan_data().

Author(s)

Sam Abbott

Examples

priors <- data.frame(variable = "frac_obs", mean = 3, sd = 1)
data <- list(obs_scale_mean = 4, obs_scale_sd = 3)
update_secondary_args(data, priors)

EpiNow2 documentation built on Sept. 26, 2023, 5:11 p.m.