runModel: Run the DM model

Description Usage Arguments Value

Description

This function takes the list created by readDMData() and runs the Bayesian model to estimate the SR parameters. The output is written to a .csv file and an .Rdata file. It writes a file, mod1.txt to the user's working directory

Usage

1
2
runModel(filename, input = NULL, priors = NULL, run = TRUE,
  sims = 10000, numChains = 3, oldSims = NULL, silent = FALSE)

Arguments

filename

csv file saved from the DM tab of A & P file. Must have age data.

input

A list that includes parameters for running the model (see readData for details) of particular interest are the parameters SRfunction, analysisType, and escapementObsSD. SRfunction sets the spawner-recruit function to be used. Current options are "ricker", "bevertonHolt" or "hockeyStick". analysisType can be either "DM" or "SS". DM corresponds to the traditional Dynamic Model which uses the maturation rates from the DynamicsInput tab in the A&P table. SS corresponds to the State Space model which estimates the maturation rates and includes observation error in the spawner counts. If escapementObsSD is a positive real number, observation error is fixed at that value. If it is NULL, observation error is a free parameter that is estimated.

priors

parameters for prior distributions in the JAGS model. See createPriors.

run

if run=TRUE, the model is run and the results returned, otherwise all of the information necessary to run the model is returned without running the model

sims

length of each MCMC chain; default is 10000

numChains

number of MCMC chains. default is 3

oldSims

?

silent

Whether to print progress messages.

Value

a dmObj: a list of output for a single model fit.


eeholmes/DM documentation built on May 26, 2019, 3:36 p.m.