if(extinctAg == 1)
statement and instead modified model so that entire cycle run regardless of spawner abundanceOption 2 selected for now
ageStruc
) are now matricestauAge
ppnAges, Smsy, estRicB, ppnAge2Ret4
now have additional dimensionplotOneTrial
function)plotMedian
function) aggDat.csv
includes: cuDat.Rdata
includes CU-specific values for:Required files; Additional details in inputParSummary.md
...simInputs.csv
contains simulation specific parameters that are shared among CUs...CUPars.csv
contains CU-specific SR parameters and age estimates, as well as entries for different initial abundances and exploitation ratesOptional files
fraserDat/rickerMCMCPars.csv
)...RecDatTrim.csv
contains stock and age-specific recruitment data used to set initial age proportions and prime model with abundance TS...CatchDatTrim.csv
contains sector specific catch data tamRefPts.csv
)usER
and canER
are in sims.csv
; vector singER
is in ...CUPars.csv
obsCanCatch
) into CU-specific catch estimates; singObsCatch
does not because these fisheries would assume all captured individuals originate in that CUppnCatchErr
function, which is closely related to ppnAgeErr
function, and based on each year's true proportional contribution plus error associated with mis-assignment of aggregate catches to specific CUs (see catchTau below for details)migMort
that represents fish that escape the marine American/Canadian fisheries, but die prior to spawning and terminal fisheries (could be moved if this jars with allocation issues)enRouteMR
is CU-specific and varies across years based on enRouteSig
data/fraserDat/postSeasonMortality_2017.csv
obsSig
(ricA/ricB)*(0.5-0.07ricA)
with explicit solution generated with Lambert W function: (1 - lambert_W0(exp(1-ricA)))/ricB
exploreTau.R
and output files in simData/exploreTau/exploreAgeTau
; input files in data/tauDummySim
tauEstimator.R
; mean=1.17data/ fraserTauEstimates.csv
ageProportion.pdf
and compared SD of each age class's proportional abundancetauEstimator.R
, which is based on get.mv.logistic.tau.R
from C Holtdiagnostics/tauExplore
show true/observed CU specific contributions to aggregate catch and percent errorSimpleSimWCatch.R
and renamed recoverySim.R
mortCalc
function (Feb. 8)tamRefPts.csv
)camGenDat/forecastEstimates.csv
and prepFRParInputs.R
for detailsfraserDat/camGenDat/frTotalCatch.csv
mortCalcTAM
to constrain target Canadian FR to 0.01 when realized ER is over 100%mortCalcTam
in simFunctions.R
); however high level uncertainty, biased towards overfishing seemed to result in unrealistically large levels of extirpationpmFunctions.R
contain functions to produce output plots using summary lists of CU-specific and aggregate performance metricscompareOMsPlot
) and plot agg PMs vs. MPs for multiple OMs simultaneouslyUsing Ricker.MVT
from simFunctions.R
Ricker.MVT<-function(S,a,b,cv,error){
N<-length(a)
R<-NA
if(a>=0){
if(b!=0) R <- S*exp(a-b*S)*exp(err)
if(b==0) R <- S*exp(error)
}
if(a<0) R<-S*exp(a)*exp(error)*exp(err)
return(R)
}
Justification: input SR parameters currently being estimated with hierarchical, non-AR models
err
and arRicSig
), but could be removed depending on future model goalsobsErrDat
dataframe which contains observation error estimatesprofvis
ppnAges
matrix, 2) estimating y-intercept, slope and rSq with internal SR relationship, and 3) estimating slope of declineparallel
, doParallel
, and foreach
packagesparlapply
call; be sure to specify all necessary libraries, objects, and external functions using clusterExport
or cluserEvalQ
mixOutErr
, migMortErr
and singOutErr
from qnorm(runif(nCU, 0.0001, 0.9999), 0, fisheryOUSigma)
outputs/miscSensitivity/minTrials
ppnMixHigh
- proportion of Canadian catch allocated to mixed stock fisheries by default (currently set at 0.8)ppnMixLow
- as above but lower value intended to test whether outcomes improve when singleCU allocations increase; only used when following truevaryAllocation
- if TRUE then ppnMixHigh is replaced with ppnMixLow when threshold values reachedvaryAllocation
is true the HCR control rule switches to ppnMixLow if agS < agSGen in 3 of previous 5 yearsmeanStatus <- ifelse(length(CUs) > 1,
mean(apply(lowerBM[(y - 1):(y - gen), CUs], 2, sum)),
sum(lowerBM[(y - 1):(y - gen), CUs]))
poorStatusMU[y, CUs] <- ifelse(meanStatus > 0.5 * gen, 1, 0)
calcObsCatch
postSeasonMortality_2017.csv
calcTAC
and calcHarvRate
, replacing mortCalc
and tamERCalc
in simUtilityFunc.R
corrMat == "custom"
model looks for an input correlation matrix to use instead of applying static value passed from simPars$correlCU
fraserCovariance.R
ncChumDoc.md
and simulationRunNotes.md
, as well as referenced R scripts and output filesOBSOLETE SEE NEW NOTE FOR SEP 25 - Single CU ERs coded to remove fixed proportion of Canadian TAC (currently fixed at 20%) - Added simple management lever so that this TAC is only exploited when recruitment has greater than lower benchmark in at least 50% of years in previous generation - Currently uses true recruitment and true sGen, but would be more realistic to switch to observed and estimated respectively
singTAC[y, k] <- ifelse(sum(lowerBM[(y-gen):(y-1), k]) > (0.5 * gen), tacs[[3]], 0)
ifelse()
used to define singCatch is separate and helps constrain realized ERs < 1lm()
with quickLM()
which is a wrapper for a C++ equivalent that is trimmed down and much fastermodRickerAR1.MVT
, which is modified version of C. Holts function but modified to account for CU-specific recruitment deviations being estimated outside modelRicker.MVT
recRY
in a given year is above the cycle-specific fishery reference point ID'd by TAM ruleaggDat.csv
lowCatchThresh
and highCatchThresh
to simInput files)decline
scenario); during these years recruitment deviations are drawn from a skewed multivariate t-distributionsn
package with rmst(n = 1, xi = rep(0, nCU), alpha = rep(-0.5, nCU), nu = 7, Omega = corMat)
constrain
and calcTAC
functions in simUtilityFuc.R for details catchChange
calculates the relative difference in total catch between years, then inverts the value to provide an index of catch stability (i.e. lower is better)lowCatchThresh
and highCatchThresh
are Fraser specific PMs that represent minimum TACs corresponding to higher levels of management strain (500k and 1 million fish)Goal was to ensure that TACs that are calculated based on TAM rule and relative allocation to mixed vs. single-CU fisheries result in harvest rates that do not decline as fishery progresses
calcTAC
functioncalcTAC
output by true proportional contribution of each CU (for mixed stock fisheries) or forecasted proportion (for single CU fisheries)calcHarvRate
for detailsPotential issues - Because outcome uncertainty applied at multiple steps (both mixed stock fisheries, en route mortality) it is very possible that realized catch rates will not reflect proportions that are pre-specified - Management adjustment in TAM rule may not be sufficient to prevent overharvest in single stock CUs
outputs/miscSensitivity/biasCorrection
salmon-sim/estimateOU.R
samSim/recoverySim.R
to apply OU on ER rather than TAC by adding a calcRealCatch
function that receives target TAC as inputsestimateOU.R
scriptsynchSalmon/ouSimulationTests.Rmd
for detailscalcTAC
and constrain
functionsrandom = TRUE
argument to recoverySim()
which disables the set seed function. As a result each simulation run begins on a random number, which allows for multiple identical scenarios to be run simultaneously.salmon-sim/scripts/frKalmanAClear.R
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.