Title: | Fitting Multiple State-Space Assessment Models |
---|---|
Description: | Fitting multiple SAM models. |
Authors: | Christoffer Moesgaard Albertsen [aut, cre] |
Maintainer: | Christoffer Moesgaard Albertsen <[email protected]> |
License: | GPL-2 |
Version: | 0.4.0 |
Built: | 2024-11-14 05:29:42 UTC |
Source: | https://github.com/calbertsen/multi_SAM |
Function to add transparency to a color
addTrans(name, alpha = 1)
addTrans(name, alpha = 1)
name |
Name of color |
alpha |
Alpha level |
A hex color string
Christoffer Moesgaard Albertsen
Collect a number of msam objects into an msamset
## S3 method for class 'msam' c(...)
## S3 method for class 'msam' c(...)
... |
msam objects |
An msamset
Catch plot
## S3 method for class 'msam' catchplot(fit, obs.show = TRUE, drop = 0, ...)
## S3 method for class 'msam' catchplot(fit, obs.show = TRUE, drop = 0, ...)
fit |
msam object |
obs.show |
Show observations in plot? |
drop |
Number of years to drop from the end |
... |
extra arguments for plotting |
Christoffer Moesgaard Albertsen
Catch Table
## S3 method for class 'msam' catchtable(fit, obs.show = FALSE, returnList = FALSE, ...)
## S3 method for class 'msam' catchtable(fit, obs.show = FALSE, returnList = FALSE, ...)
fit |
msam object |
obs.show |
should observed catches be included? |
returnList |
If true, a list of matrices is returned |
... |
Other parameters |
Table of predicted catch in weight
A matrix of estimates and confidence intervals
Christoffer Moesgaard Albertsen
Extract parameter estimates of msam object
## S3 method for class 'msam' coef(object, ...)
## S3 method for class 'msam' coef(object, ...)
object |
msam object |
... |
extra arguments not used |
a vector of parameter estimates
Christoffer Moesgaard Albertsen
Correlation and partial correlation plot between survival processes
## S3 method for class 'msam' corplot(object, ...)
## S3 method for class 'msam' corplot(object, ...)
object |
msam object |
... |
Other parameters not currently used |
A matrix of correlations (lower triangular) and partial correlations (upper triangular)
Christoffer Moesgaard Albertsen
Deterministic reference points
## S3 method for class 'msam' deterministicReferencepoints( fit, referencepoints, catchType = "catch", nYears = 300, Fsequence = seq(0, 2, len = 50), aveYears = lapply(fit, function(x) max(x$data$years) + (-9:0)), selYears = lapply(fit, function(x) max(x$data$years)), biasCorrect = FALSE, newton.control = list(), ... )
## S3 method for class 'msam' deterministicReferencepoints( fit, referencepoints, catchType = "catch", nYears = 300, Fsequence = seq(0, 2, len = 50), aveYears = lapply(fit, function(x) max(x$data$years) + (-9:0)), selYears = lapply(fit, function(x) max(x$data$years)), biasCorrect = FALSE, newton.control = list(), ... )
fit |
|
referencepoints |
|
catchType |
|
nYears |
|
Fsequence |
|
aveYears |
|
selYears |
|
biasCorrect |
|
newton.control |
|
... |
Christoffer Moesgaard Albertsen
F-at-age table
## S3 method for class 'msam' faytable(fit, returnList = FALSE, ...)
## S3 method for class 'msam' faytable(fit, returnList = FALSE, ...)
fit |
msam object |
returnList |
If true, a list of matrices is returned |
... |
Other parameters |
Table of estimated age-wise fishing mortality
A matrix of estimates and confidence intervals
Christoffer Moesgaard Albertsen
Fbar plot for msam object
## S3 method for class 'msam' fbarplot( fit, partial = FALSE, drop = 0, page = NULL, plot = TRUE, effectiveF = TRUE, add = FALSE, ex = numeric(0), ... )
## S3 method for class 'msam' fbarplot( fit, partial = FALSE, drop = 0, page = NULL, plot = TRUE, effectiveF = TRUE, add = FALSE, ex = numeric(0), ... )
fit |
fitted msam object |
partial |
Should F for each age in Fbar range be added? |
drop |
Number of years to drop from the end |
page |
List of ages to be used per stock for partial = true. Defaults to all ages used to calculate Fbar. |
... |
plotting arguments |
Christoffer Moesgaard Albertsen
Fbar Table
## S3 method for class 'msam' fbartable(fit, ...)
## S3 method for class 'msam' fbartable(fit, ...)
fit |
msam object |
... |
Other parameters |
Table of estimated average fishing mortalities
A matrix of estimates and confidence intervals
Christoffer Moesgaard Albertsen
Fit plot
## S3 method for class 'msam' fitplot( fit, stock, log = TRUE, fleets = lapply(attr(fit, "m_data")$sam, function(x) unique(x$aux[, "fleet"])), ... )
## S3 method for class 'msam' fitplot( fit, stock, log = TRUE, fleets = lapply(attr(fit, "m_data")$sam, function(x) unique(x$aux[, "fleet"])), ... )
fit |
msam object |
stock |
Stock to plot for |
log |
Plot on log-scale? |
fleets |
Fleets to plot |
... |
extra arguments for plotting |
Christoffer Moesgaard Albertsen
F selectivity plot
## S3 method for class 'msam' fselectivityplot( fit, cexAge = 1, type = c("bar", "line"), col = .plotcols.crp(length(fit)), ... )
## S3 method for class 'msam' fselectivityplot( fit, cexAge = 1, type = c("bar", "line"), col = .plotcols.crp(length(fit)), ... )
fit |
msam object |
cexAge |
size of Age label |
type |
bar for separate bar plots, line for overlayed line plots |
col |
Line colors for line plot |
... |
extra arguments for plotting |
Christoffer Moesgaard Albertsen
Prepare allele matrix for PCA analysis
gen2PCA(x, alleleMeans)
gen2PCA(x, alleleMeans)
x |
output from \linkread.gen |
alleleMeans |
Mean allele frequencies to impute. Is calculated if missing. |
allele data for PCA analysis
Christoffer Moesgaard Albertsen
Calculate gradient of a function
grad( func, x, h = abs(1e-04 * x) + 1e-04 * (abs(x) < sqrt(.Machine$double.eps/7e-07)), ... )
grad( func, x, h = abs(1e-04 * x) + 1e-04 * (abs(x) < sqrt(.Machine$double.eps/7e-07)), ... )
func |
function |
x |
parameter values |
... |
passed to func |
gradient vector
Christoffer Moesgaard Albertsen
Holdout forecast for validation
holdout(fit, nYears, ...) ## S3 method for class 'msam' holdout(fit, nYears, forecastYears = 1, ncores = 1, ...)
holdout(fit, nYears, ...) ## S3 method for class 'msam' holdout(fit, nYears, forecastYears = 1, ncores = 1, ...)
fit |
msam fit |
nYears |
Number of years to hold out |
... |
Arguments passed to modelforecast |
A model forecast
Christoffer Moesgaard Albertsen
Calculate jacobian of a function
jacobian( func, x, h = abs(1e-04 * x) + 1e-04 * (abs(x) < sqrt(.Machine$double.eps/7e-07)), ... )
jacobian( func, x, h = abs(1e-04 * x) + 1e-04 * (abs(x) < sqrt(.Machine$double.eps/7e-07)), ... )
func |
function |
x |
parameter values |
... |
passed to func |
jacobian matrix
Christoffer Moesgaard Albertsen
Jitter runs
## S3 method for class 'msam' jit( fit, nojit = 10, par = NULL, sd = 0.25, ncores = parallel::detectCores() - 1, silent = TRUE )
## S3 method for class 'msam' jit( fit, nojit = 10, par = NULL, sd = 0.25, ncores = parallel::detectCores() - 1, silent = TRUE )
fit |
a fitted model object as returned from sam.fit |
nojit |
a list of vectors. Each element in the list specifies a run where the fleets mentioned are omitted |
par |
initial values to jitter around. The defaule ones are returned from the defpar function |
sd |
the standard deviation used to jitter the initial values (most parameters are on a log scale, so similar to cv) |
ncores |
the number of cores to attemp to use |
...
A "samset" object, which is basically a list of sam fits
Life expectancy plot
## S3 method for class 'msam' lifeexpectancyplot( fit, atRecruit = TRUE, col = .plotcols.crp(length(fit)), ylimAdd = max(sapply(fit, function(x) x$conf$maxAge)), ... )
## S3 method for class 'msam' lifeexpectancyplot( fit, atRecruit = TRUE, col = .plotcols.crp(length(fit)), ylimAdd = max(sapply(fit, function(x) x$conf$maxAge)), ... )
fit |
msam object |
... |
extra arguments for plotting |
Christoffer Moesgaard Albertsen
Life expectancy Table
## S3 method for class 'msam' lifeexpectancytable(fit, atRecruit = TRUE, ...)
## S3 method for class 'msam' lifeexpectancytable(fit, atRecruit = TRUE, ...)
fit |
msam object |
... |
Other parameters |
Table of estimated life expectancy.
A matrix of estimates and confidence intervals
Christoffer Moesgaard Albertsen
Forecast of a multiStockassessment
## S3 method for class 'msam' modelforecast( fit, constraints = NULL, fscale = NULL, catchval = NULL, fval = NULL, nextssb = NULL, landval = NULL, nosim = 1000, year.base = unlist(min(sapply(fit, function(x) max(x$data$years)))), ave.years = lapply(fit, function(x) max(x$data$years) + (-9:0)), overwriteBioModel = FALSE, rec.years = lapply(fit, function(x) numeric(0)), label = NULL, overwriteSelYears = NULL, deterministicF = FALSE, processNoiseF = FALSE, fixedFdeviation = FALSE, useFHessian = FALSE, resampleFirst = !is.null(nosim) && nosim > 0, resampleParameters = FALSE, useModelLastN = TRUE, fixFirstN = FALSE, customSel = NULL, lagR = FALSE, splitLD = FALSE, addTSB = FALSE, biasCorrect = FALSE, returnAllYears = FALSE, returnObj = FALSE, progress = nosim > 0 && ncores == 1, estimate = median, silent = TRUE, newton_config = NULL, custom_pl = NULL, useNonLinearityCorrection = (nosim > 0 && !deterministicF), ncores = 1, ... )
## S3 method for class 'msam' modelforecast( fit, constraints = NULL, fscale = NULL, catchval = NULL, fval = NULL, nextssb = NULL, landval = NULL, nosim = 1000, year.base = unlist(min(sapply(fit, function(x) max(x$data$years)))), ave.years = lapply(fit, function(x) max(x$data$years) + (-9:0)), overwriteBioModel = FALSE, rec.years = lapply(fit, function(x) numeric(0)), label = NULL, overwriteSelYears = NULL, deterministicF = FALSE, processNoiseF = FALSE, fixedFdeviation = FALSE, useFHessian = FALSE, resampleFirst = !is.null(nosim) && nosim > 0, resampleParameters = FALSE, useModelLastN = TRUE, fixFirstN = FALSE, customSel = NULL, lagR = FALSE, splitLD = FALSE, addTSB = FALSE, biasCorrect = FALSE, returnAllYears = FALSE, returnObj = FALSE, progress = nosim > 0 && ncores == 1, estimate = median, silent = TRUE, newton_config = NULL, custom_pl = NULL, useNonLinearityCorrection = (nosim > 0 && !deterministicF), ncores = 1, ... )
fit |
|
fscale |
|
catchval |
|
fval |
|
nextssb |
|
landval |
|
nosim |
|
year.base |
|
ave.years |
|
rec.years |
|
label |
|
overwriteSelYears |
|
deterministicF |
|
processNoiseF |
|
customSel |
|
lagR |
|
splitLD |
|
addTSB |
|
biasCorrect |
|
returnAllYears |
msamforecast
Model table
## S3 method for class 'msam' modeltable(fits, ...)
## S3 method for class 'msam' modeltable(fits, ...)
fits |
msam object |
... |
extra arguments |
A matrix of model information
Christoffer Moesgaard Albertsen
Model table
## S3 method for class 'msamset' modeltable(fits, ...)
## S3 method for class 'msamset' modeltable(fits, ...)
fits |
msamset object |
... |
extra arguments |
A matrix of model information
Christoffer Moesgaard Albertsen
Fit multiple SAM models with correlated survival processes.
multisam.fit( x, formula = ~-1, corStructure = suggestCorStructure(x, nAgeClose = 0), usePartialCors = TRUE, newtonsteps = 0, rm.unidentified = FALSE, nlminb.control = list(trace = 1, eval.max = 20000, iter.max = 20000), lower = NULL, upper = NULL, starting = NULL, community_formula = ~-1, community_type = 1, shared_data = NULL, shared_keys = character(0), shared_selectivity = 0, shared_seasonality = 0, shared_stockrecruitment = FALSE, shared_oneFScalePars = FALSE, shared_initN = FALSE, shared_fleetParameters = c(), shared_proportionalHazard = NULL, shared_phmap = NULL, skip_stock_observations = FALSE, stockAreas = matrix(1, 1, length(x)), genetics_data = prepareGenetics(), genetics_dirichlet = FALSE, genetics_spatialAge = TRUE, genetics_independentStocks = TRUE, initN = 0, initF = FALSE, parlist = NULL, run = TRUE, symbolicAnalysis = FALSE, fullDerived = FALSE, mohn = FALSE, ... )
multisam.fit( x, formula = ~-1, corStructure = suggestCorStructure(x, nAgeClose = 0), usePartialCors = TRUE, newtonsteps = 0, rm.unidentified = FALSE, nlminb.control = list(trace = 1, eval.max = 20000, iter.max = 20000), lower = NULL, upper = NULL, starting = NULL, community_formula = ~-1, community_type = 1, shared_data = NULL, shared_keys = character(0), shared_selectivity = 0, shared_seasonality = 0, shared_stockrecruitment = FALSE, shared_oneFScalePars = FALSE, shared_initN = FALSE, shared_fleetParameters = c(), shared_proportionalHazard = NULL, shared_phmap = NULL, skip_stock_observations = FALSE, stockAreas = matrix(1, 1, length(x)), genetics_data = prepareGenetics(), genetics_dirichlet = FALSE, genetics_spatialAge = TRUE, genetics_independentStocks = TRUE, initN = 0, initF = FALSE, parlist = NULL, run = TRUE, symbolicAnalysis = FALSE, fullDerived = FALSE, mohn = FALSE, ... )
x |
samset from the stockassessment package |
formula |
formula for covariance matrix covariates (See Details) |
corStructure |
symmetric boolean matrix. True if a (partial) correlation in survival should be fixed to zero between the corresponding age/stock combination |
usePartialCors |
if TRUE corStructure describes the partial correlations. If FALSE corStructure describes correlations. |
newtonsteps |
As for stockassessment::sam.fit |
lower |
As for stockassessment::sam.fit |
upper |
As for stockassessment::sam.fit |
... |
Additional arguments passed to TMB::MakeADFun |
Function to fit a multi-stock SAM model (Albertsen et al., 2018).
A list of class msam and samset
Christoffer Moesgaard Albertsen
Albertsen, C. M., Nielsen, A. and Thygesen, U. H. (2018) Connecting single-stock assessment models through correlated survival. ICES Journal of Marine Science, 75(1), 235-244. doi: 10.1093/icesjms/fsx114
if(require(stockassessment)){ data(nscodData) data(nscodConf) data(nscodParameters) fit <- sam.fit(nscodData, nscodConf, nscodParameters) fits <- c(fit) obj <- multisam.fit(fits) }
if(require(stockassessment)){ data(nscodData) data(nscodConf) data(nscodParameters) fit <- sam.fit(nscodData, nscodConf, nscodParameters) fits <- c(fit) obj <- multisam.fit(fits) }
N Table
## S3 method for class 'msam' ntable(fit, returnList = FALSE, ...)
## S3 method for class 'msam' ntable(fit, returnList = FALSE, ...)
fit |
msam object |
returnList |
If true, a list of matrices is returned |
... |
Other parameters |
Table of estimated numbers-at-age
A matrix of estimates and confidence intervals
Christoffer Moesgaard Albertsen
Parameter plot
## S3 method for class 'msam' parplot(fit, cor.report.limit = 0.95, ...)
## S3 method for class 'msam' parplot(fit, cor.report.limit = 0.95, ...)
fit |
msam object |
cor.report.limit |
Not used |
... |
extra arguments for plotting |
Christoffer Moesgaard Albertsen
Parameter table
## S3 method for class 'msam' partable(fit, ...)
## S3 method for class 'msam' partable(fit, ...)
fit |
msam object |
... |
Other parameters |
Table of estimated parameters
A matrix of estimates and confidence intervals
Christoffer Moesgaard Albertsen
Function to actually do the plotting
## S3 method for class 'msam' plotit( fit, what, x = lapply(attr(fit, "m_data")$sam, function(x) x$years), ylab = what, xlab = "Years", ex = numeric(0), trans = function(x) x, add = FALSE, ci = TRUE, cicol = gray(0.5, alpha = 0.5), addCI = NA, drop = 0, unnamed.basename = "current", xlim = NULL, ciAlpha = 0.3, col = .plotcols.crp(length(fit) + 1), extraLabel = NULL, addTotal = FALSE, onlyTotal = FALSE, legend.pos = "bottom", stocks = seq_len(length(fit) + addTotal), ... ) ## S3 method for class 'msamforecast' plotit( fit, what, x = fit$data$years, ylab = what, xlab = "Years", ex = numeric(0), trans = exp, add = FALSE, ci = TRUE, cicol = gray(0.5, alpha = 0.5), addCI = NA, drop = 0, unnamed.basename = "current", xlim = NULL, addTotal = FALSE, onlyTotal = FALSE, ... )
## S3 method for class 'msam' plotit( fit, what, x = lapply(attr(fit, "m_data")$sam, function(x) x$years), ylab = what, xlab = "Years", ex = numeric(0), trans = function(x) x, add = FALSE, ci = TRUE, cicol = gray(0.5, alpha = 0.5), addCI = NA, drop = 0, unnamed.basename = "current", xlim = NULL, ciAlpha = 0.3, col = .plotcols.crp(length(fit) + 1), extraLabel = NULL, addTotal = FALSE, onlyTotal = FALSE, legend.pos = "bottom", stocks = seq_len(length(fit) + addTotal), ... ) ## S3 method for class 'msamforecast' plotit( fit, what, x = fit$data$years, ylab = what, xlab = "Years", ex = numeric(0), trans = exp, add = FALSE, ci = TRUE, cicol = gray(0.5, alpha = 0.5), addCI = NA, drop = 0, unnamed.basename = "current", xlim = NULL, addTotal = FALSE, onlyTotal = FALSE, ... )
fit |
msam fit |
what |
variable to plot |
x |
x-axis values |
ylab |
y-axis label |
xlab |
x-axis label |
ex |
extra years to add |
trans |
function to transform variable to plot |
add |
If false a new plot is created. If true everything is added to the previous plot- |
ci |
Add confidence intervals? |
cicol |
Color of confidence intervals |
addCI |
Not used |
drop |
Number of years to drop from the end |
unnamed.basename |
not used |
xlim |
x-axis limits. If null, the range of x is used. |
ciAlpha |
Alpha channel value of confidence interval color |
col |
line colors |
extraLabel |
Not used |
... |
Other arguments |
Print output from multisam.fit
## S3 method for class 'msam' print(x, ...)
## S3 method for class 'msam' print(x, ...)
x |
A msam object |
... |
Other parameters passes to logLik |
Print msam coef object
## S3 method for class 'msamcoef' print(x, ...)
## S3 method for class 'msamcoef' print(x, ...)
x |
msamcoef object |
... |
Not used |
Christoffer Moesgaard Albertsen
Read genepop data files
read.gen( f, pop.names, sort.loci = FALSE, sort.individuals = FALSE, NAlleleKeep = NA )
read.gen( f, pop.names, sort.loci = FALSE, sort.individuals = FALSE, NAlleleKeep = NA )
f |
file name |
pop.names |
population names. If missing, the ID of the last individual is used |
sort.loci |
Should loci be sorted by names? |
sort.individuals |
Should individuals be sorted by id? |
an allele array
Christoffer Moesgaard Albertsen
Recruitment plot
## S3 method for class 'msam' recplot(fit, ...)
## S3 method for class 'msam' recplot(fit, ...)
fit |
msam object |
... |
extra arguments for plotting |
Christoffer Moesgaard Albertsen
Recruitment Table
## S3 method for class 'msam' rectable(fit, ...)
## S3 method for class 'msam' rectable(fit, ...)
fit |
msam object |
... |
Other parameters |
Table of estimated recruitment to the fisheries.
A matrix of estimates and confidence intervals
Christoffer Moesgaard Albertsen
Simulate from a msam object
## S3 method for class 'msam' simulate( object, nsim = 1, seed = NULL, full.data = TRUE, ready.to.fit = FALSE, ... )
## S3 method for class 'msam' simulate( object, nsim = 1, seed = NULL, full.data = TRUE, ready.to.fit = FALSE, ... )
object |
msam object result from multisam.fit |
nsim |
Number of simulations |
seed |
random number seed |
full.data |
should a full data set for sam.fit be returned? |
... |
Other arguments not used |
a list of lists.
Christoffer Moesgaard Albertsen
Stock-recruitment plot
## S3 method for class 'msam' srplot( fit, textcol = "red", add = FALSE, col = .plotcols.crp(length(fit)), ... )
## S3 method for class 'msam' srplot( fit, textcol = "red", add = FALSE, col = .plotcols.crp(length(fit)), ... )
fit |
msam object |
textcol |
Text color |
add |
Should the figure be added to a current plot? |
col |
Line colors |
... |
extra arguments for plotting |
Christoffer Moesgaard Albertsen
SSB plot
## S3 method for class 'msam' ssbplot(fit, ...)
## S3 method for class 'msam' ssbplot(fit, ...)
fit |
msam object |
... |
extra arguments for plotting |
Christoffer Moesgaard Albertsen
SSB Table
## S3 method for class 'msam' ssbtable(fit, ...)
## S3 method for class 'msam' ssbtable(fit, ...)
fit |
msam object |
... |
Other parameters |
Table of estimated spawning stock biomasses.
A matrix of estimates and confidence intervals
Christoffer Moesgaard Albertsen
Construct valid (band) correlation structures for multisam.fit
suggestCorStructure( x, nAgeClose = 1, noConnection = FALSE, onlyCloseAge = TRUE, noCorInArea = TRUE, onlyCorInArea = FALSE, noCorBetween = matrix(0, 0, 2) )
suggestCorStructure( x, nAgeClose = 1, noConnection = FALSE, onlyCloseAge = TRUE, noCorInArea = TRUE, onlyCorInArea = FALSE, noCorBetween = matrix(0, 0, 2) )
x |
a samset |
nAgeClose |
Number of close ages to correlate |
noConnection |
If TRUE, no correlations |
onlyCloseAge |
If TRUE, age classes no less than nAgeClose are un-correlated |
noCorInArea |
If TRUE, age classes in same area/stock are un-correlated |
onlyCorInArea |
If TRUE, only age classes in same area/stock are correlated |
noCorBetween |
matrix of area/stock numbers that should not be correlated |
A boolean matrix
Christoffer Moesgaard Albertsen
Summary of msam object
## S3 method for class 'msam' summary(object, returnList = FALSE, digits = c(0, 0, 3), ...)
## S3 method for class 'msam' summary(object, returnList = FALSE, digits = c(0, 0, 3), ...)
object |
msam object |
returnList |
If true, a list of table is returned |
digits |
digits for rounding output. Vector of length 3 corresponding to recruitment, ssb, and fbar. |
... |
not used |
a summary table
Christoffer Moesgaard Albertsen
Table helper
tableit( fit, what, x = lapply(attr(fit, "m_data")$sam, function(x) x$years), trans = function(x) x, returnList = FALSE, ... ) ## S3 method for class 'msam' tableit( fit, what, x = lapply(attr(fit, "m_data")$sam, function(x) x$years), trans = function(x) x, returnList = FALSE, addTotal = FALSE, ... )
tableit( fit, what, x = lapply(attr(fit, "m_data")$sam, function(x) x$years), trans = function(x) x, returnList = FALSE, ... ) ## S3 method for class 'msam' tableit( fit, what, x = lapply(attr(fit, "m_data")$sam, function(x) x$years), trans = function(x) x, returnList = FALSE, addTotal = FALSE, ... )
fit |
msam object |
what |
quoted name of what to extract |
x |
rownames of table |
trans |
function to be applied |
returnList |
If true, a list of matrices is returned |
... |
extra arguments not used |
matrix of estimates and confidence intervals
Christoffer Moesgaard Albertsen
TSB plot
## S3 method for class 'msam' tsbplot(fit, ...)
## S3 method for class 'msam' tsbplot(fit, ...)
fit |
msam object |
... |
extra arguments for plotting |
Christoffer Moesgaard Albertsen
TSB Table
## S3 method for class 'msam' tsbtable(fit, ...)
## S3 method for class 'msam' tsbtable(fit, ...)
fit |
msam object |
... |
Other parameters |
Table of estimated total stock biomasses.
A matrix of estimates and confidence intervals
Christoffer Moesgaard Albertsen
Life Years lost to fishing plot
## S3 method for class 'msam' yearslostplot(fit, cause = c("Fishing", "Other", "LifeExpectancy"), ...)
## S3 method for class 'msam' yearslostplot(fit, cause = c("Fishing", "Other", "LifeExpectancy"), ...)
fit |
msam object |
... |
extra arguments for plotting |
Christoffer Moesgaard Albertsen
Yield per recruit calculation
## S3 method for class 'msam' ypr( fit, Flimit = 2, Fdelta = 0.01, aveYears = lapply(attr(fit, "m_data")$sam, function(x) min(15, length(x$years))), ageLimit = 100, ... )
## S3 method for class 'msam' ypr( fit, Flimit = 2, Fdelta = 0.01, aveYears = lapply(attr(fit, "m_data")$sam, function(x) min(15, length(x$years))), ageLimit = 100, ... )
fit |
msam object |
Flimit |
Upper limit for Fbar |
Fdelta |
increments on the Fbar axis |
aveYears |
A list/vector of same length as the number of stocks with number of years to average over |
ageLimit |
Oldest age used |
... |
not used |
A list of samypr objects
Christoffer Moesgaard Albertsen