The main function for taking an object created by format_driors
and fitting a
model using sraplus
fit_sraplus( driors, include_fit = TRUE, seed = 42, plim = 0.05, model_name = "sraplus_tmb", randos = "log_proc_errors", draws = 1e+05, n_keep = 2000, engine = "sir", cores = 4, chains = 1, cleanup = FALSE, max_treedepth = 10, adapt_delta = 0.8, estimate_shape = FALSE, estimate_qslope = FALSE, estimate_q = TRUE, estimate_proc_error = TRUE, estimate_initial_state = TRUE, estimate_k = TRUE, estimate_f = FALSE, learn_rate = 0.001, analytical_q = FALSE, use_baranov = TRUE, include_m = FALSE, ci = 0.89, try_again = FALSE, eps = 1e-06, max_time = Inf, eval.max = 200, iter.max = 150, rel.tol = 1e-10, loopnum = 1, newtonsteps = 1, tune_prior_predictive = TRUE, index_fit_tuner = "sir", refresh = 250, log_bias_correct = TRUE, workers = workers, thin_draws = FALSE, thin_rate = 0.5, ... )
driors | a list of driors passed from sraplus::format_driors |
---|---|
include_fit | logical indicating whether to return the fitted object |
seed | seed for model runs |
plim | cutoff (in units of B/K) for hockey stick PT function |
model_name | the name of the sraplus TMB version to be run, defaults to "sraplus_tmb" |
randos | random effects when passing to TMB |
draws | the number of SIR samples to run |
n_keep | the number of SIR samples to keep |
engine | one of 'sir','stan', or 'tmb' |
cores | number of cores for stan fits |
chains | number of chains for stan fits |
cleanup | logical indicating whether to remove the compiled TMB model after running |
max_treedepth | max_treedepth for models fit using stan |
adapt_delta | adap_delta for models fit using stan |
estimate_shape | logical indicating whether to estimate the shape parameter of the Pella-Tomlinson model. If FALSE shape parameter is held at the initial value, either default or supplied |
estimate_qslope | logical indicating whether to estimate a slope parameter for q in CPUE fitting.
If FALSE q_slope is held at the initial value, either default or supplied. if TRUE, |
estimate_proc_error | logical indicating whether to estimate process errors. If FALSE process errors are not included in the model |
ci | confidence/credible interval range for summaries |
... |
a fitted sraplus object