The a4aFit class was built to store the a4a stock assessment fits.

a4aFit(...)

a4aFit(...)

clock(object, ...)

# S4 method for a4aFit
clock(object)

fitSumm(object, ...)

# S4 method for a4aFit
fitSumm(object)

# S4 method for a4aFit
stock.n(object)

# S4 method for a4aFit,ANY
harvest(object)

# S4 method for a4aFit
catch.n(object)

# S4 method for a4aFit
index(object)

# S4 method for a4aFit
show(object)

# S4 method for a4aFit
logLik(object, ...)

# S4 method for a4aFit
iter(obj, it)

# S4 method for a4aFit
computeCatchDiagnostics(object, stock, ...)

Arguments

...

additional argument list that might never be used

object

object of relevant class (see signature of method)

obj

the object to be subset

it

iteration to be extracted

Slots

call

The function call

clock

Information on call duration

fitSumm

Fit summary

stock.n

Estimates of stock numbers-at-age

harvest

Estimates of fishing mortality at age

catch.n

Estimates of catch numbers-at-age

index

Estimates of survey or CPUE indices-at-age

Accessors

All slots in the class have accessor and replacement methods defined that allow retrieving and substituting individual slots.

The values passed for replacement need to be of the class of that slot. A numeric vector can also be used when replacing FLQuant slots, and the vector will be used to substitute the values in the slot, but not its other attributes.

Constructor

A construction method exists for this class that can take named arguments for any of its slots. All slots are then created to match the requirements of the class validity. If an unnamed FLQuant object is provided, this is used for sizing, but not for populating any slot.

Examples

data(ple4)
data(ple4.index)

obj <- sca(stock=ple4, indices=FLIndices(ple4.index))
obj
#> a4a model fit for: PLE 
#> 
#> Call:
#> .local(stock = stock, indices = indices)
#> 
#> Time used:
#>  Pre-processing     Running a4a Post-processing           Total 
#>        1.001460        8.477839        0.486480        9.965778 
#> 
#> Submodels:
#> 	 fmodel: ~te(age, year, k = c(6, 30), bs = "tp") + s(age, k = 6)
#> 	srmodel: ~factor(year)
#> 	n1model: ~s(age, k = 3)
#> 	 qmodel:
#> 	   BTS-Combined (all): ~s(age, k = 6)
#> 	 vmodel:
#> 	   catch:              ~s(age, k = 3)
#> 	   BTS-Combined (all): ~1

slotNames(obj)
#>  [1] "pars"    "call"    "clock"   "fitSumm" "stock.n" "harvest" "catch.n"
#>  [8] "index"   "name"    "desc"    "range"  
clock(obj)
#>  Pre-processing     Running a4a Post-processing           Total 
#>        1.001460        8.477839        0.486480        9.965778 
fitSumm(obj)
#>              iters
#>                           1
#>   nopar        2.540000e+02
#>   nlogl       -1.008543e+03
#>   maxgrad      1.278680e-03
#>   nobs         8.300000e+02
#>   gcv          8.858002e-02
#>   convergence  0.000000e+00
#>   accrate                NA
#>   nlogl_comp1 -1.063960e+03
#>   nlogl_comp2  5.541910e+01

flq <- stock.n(obj)
is(flq)
#> [1] "FLQuant"   "FLArray"   "array"     "structure" "vector"   
flq <- index(obj)
is(flq)
#> [1] "FLQuants" "FLlst"    "list"     "vector"  

logLik(obj)
#> 'log Lik.' 1008.543 (df=254)
AIC(obj)
#> [1] -1509.087
BIC(obj)
#> [1] -309.8444