readData: This reads in the csv file saved from an A & P file and...

Description Usage Arguments Value

Description

The DM tab of the A & P excel file has all the necessary inputs to run DM. This reads that .csv file and makes a list needed for the DM functions. creates input which has the other user specified values for the rav file.

Usage

1
readData(a.and.p.file, input, folder = "./", silent = FALSE)

Arguments

a.and.p.file

a csv file saved from the DM tab of an A & P excel file

input

a list with the other values needed for a DM run. The following are the defaults used, but can be passed in to specify something different.

population

name of the population. Defaults to using value in A and P file.

naturalMort

vector of natural mortality for age 1:6. Defaults to c(0.5,0.4,0.3,0.2,0.1,0)

firstYear

First year of spawner data to use. Defaults to using value in cell C4 on DynamicsInput tab in A and P file.

lastYear

Last year of spawner data to use. Defaults to using value in cell C5 on DynamicsInput tab in A and P file.

MSYfirstYear

Defaults to using firstYear.

MSYlastYear

Defaults to using lastYear.

analysisType

"DM" or "SS". Defaults to DM.

SRfunction

("ricker")/"bevertonHolt"/"hockeyStick": spawner-recruit function

includeMarineSurvival

"yes"/("no"): include marine survival covariate

includeFlow

"yes"/("no"): include flow covariate

initialPopSize

Initial population size for age 2 to 5. Defaults to using values in cells N6:Q6 on DynamicsInput tab in A and P file.

prod

Used for initial conditions of optimizers and MCMC algorithm. Default is NA which means the ML estimates are used as the initial conditions.

cap

Used for initial conditions of optimizers and MCMC algorithm. Default is NA which means the ML estimates are used as the initial conditions.

msCoef

Used for initial conditions of optimizers and MCMC algorithm. Default is NA which means the ML estimates are used as the initial conditions.

flowCoef

Used for initial conditions of optimizers and MCMC algorithm. Default is NA which means the ML estimates are used as the initial conditions.

centerMS

Set mean of the MS covariate to zero in the SR function. Default is TRUE.

centerFlow

Set mean of the flow covariate to zero in the SR function. Default is TRUE.

escapementObsSD

NULL

age2correction

Correction for seeing fewer age 2 fish when sampling for age composition. The value to pass in is an estimate of detection probability for age 2 fish / detection probability for ages 3-5 fish. Default is 1.0: no correction.

silent

Whether to print progress messages.

Value

The result is a list with dat and input for the DM functions.


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