retro.rd
Performs a retrospective stock assessment for the desired years using the FLSAM stock assessment method
retro(stock, indices, control, retro, year.range)
An FLSAM
object
An FLIndices
object
An FLSAM.control
object
An integer that specifies the number of retrospective years. Default value = 0. Only used if year.range is not specified.
Numeric vector of years to perform the assessment
The argument 'year.range' is a numeric vector of years for which the assessment is to be performed. If this is not specified the integer "retro" used (default value = 0). If retro = 0 the assessment is run for final year only. If retro = 1, the assessment is run for the penultimate and final year and so on.
Returns an FLSAMs object. Individual assessments that failed to converge are not included in this object, but a warning is issued in each case.
#Load assessment
library(FLSAM)
data(NSH)
data(NSH.sam)
#Run a retrospective analyses for 3 years
res <- retro(NSH,NSH.tun,NSH.ctrl,retro=3)
#> Error in FUN(X[[i]], ...): invalid class “FLIndex” object: desc can only be of length 1
#Make an FLStocks object and plot the results
NSH.retro <- res + NSH
#> Error in eval(expr, envir, enclos): object 'res' not found
plot(NSH.retro)
#> Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'plot': object 'NSH.retro' not found