Call BT-SPAS-X on a single site/run year combination

run_single_bt_spas_x(
  bt_spas_x_bayes_params,
  bt_spas_x_input_data,
  site,
  run_year,
  effort_adjust = c(T, F),
  mainstem_version = c(F, T),
  bugs_directory,
  debug_mode
)

Arguments

site

site for which you want to fit the model

run_year

run year for which you want to fit the model

effort_adjust

whether or not you want to use catch adjusted by effort

mainstem_version

whether or not this is run on mainstem tributaries

bugs_directory

where the WinBUGS.exe file can be found. Needs to end in /WinBUGS

debug_mode

whether you want to run bugs in debug mode.

bt_spas_x_bayes_params:

a list containing number_mcmc, number_burnin, number_thin, and number_chains. Can use SRJPEmodel::bt_spas_x_bayes_params.

bt_spas_x_input_data:

a data frame containing the same variables as ?SRJPEdata::weekly_juvenile_abundance_model_data

Value

a list:

  • results model results - see ?bt_spas_x_bugs() for details.

  • site the site used to fit the model

  • run_year the run year used to fit the model

  • weeks_fit the weeks with catch used to fit the model (for analysis and plotting)

  • knots_output knot positions for the weekly abundance spline curve

Details

This function is called within run_bt_spas_x() or can be run by itself on a single site/run year combination.