fit_inseason_model.RdFits a hierarchical Bayesian in-season model using STAN based on inputs prepared from
prepare_inseason_inputs(). Supports optional autocorrelation in weekly dynamics.
fit_inseason_model(inputs)A list generated by prepare_inseason_inputs(), containing data,
initial values, and flags for covariate/autocorrelation structure.
A stanfit object from the rstan package containing the fitted model
results and posterior samples.
This function compiles and runs the appropriate STAN model using the rstan package. It automatically selects between two model variants (with and without autocorrelation) and monitors a predefined list of parameters.
STAN settings: 3 chains, 2000 iterations, and all monitored parameters are included in the return object.
rstan::stan, prepare_inseason_inputs()
Other Fit model:
fit_pCap_model(),
fit_passage_to_spawner_model(),
fit_stock_recruit_model(),
fit_survival_model()