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.
update_secondary_args(data, priors, verbose = TRUE)
A list as produced by create_stan_data()
.
A list of data and arguments as returned by create_stan_data()
.
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
.
Logical, defaults to FALSE
. Should verbose progress messages be returned.
Sam Abbott
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)
Run the code above in your browser using DataLab