The a4aFitSA class extends a4aFit to store information about the parameters of the model.

a4aFitSA(...)

a4aFitSA(...)

# S4 method for class 'a4aFitSA'
a4aFit(object, ...)

pars(object)

# S4 method for class 'a4aFitSA'
pars(object)

# S4 method for class 'a4aFitSA'
m(object)

# S4 method for class 'a4aFitSA'
wt(object)

# S4 method for class 'a4aFitSA'
qmodel(object)

# S4 method for class 'a4aFitSA'
fmodel(object)

# S4 method for class 'a4aFitSA'
srmodel(object)

# S4 method for class 'a4aFitSA'
n1model(object)

# S4 method for class 'a4aFitSA'
vmodel(object)

# S4 method for class 'a4aFitSA'
stkmodel(object)

# S4 method for class 'a4aFitSA'
show(object)

# S4 method for class 'a4aFitSA'
submodels(object, ...)

# S4 method for class 'a4aFitSA'
iter(obj, it)

a4aFitSAs(object, ...)

# S4 method for class 'list'
a4aFitSAs(object, ...)

# S4 method for class 'a4aFitSA'
a4aFitSAs(object, ...)

# S4 method for class 'missing'
a4aFitSAs(object, ...)

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

pars

an object of class SCAPars with information about model parameters

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), fit="assessment")
#> Warning: *** ~te(age, year, k = c(6, 30), bs = "tp") + s(age, k = 6) has 4 too many parameter(s)!!
#>     i will remove the redundant ones:
#> 	s(age).2
#> 	s(age).3
#> 	s(age).4
#> 	s(age).5
obj
#> a4a model fit for: PLE 
#> 
#> Call:
#> .local(stock = stock, indices = indices, fit = "assessment")
#> 
#> Time used:
#>  Pre-processing     Running a4a Post-processing           Total 
#>      0.23997498      3.82919908      0.04055524      4.10972929 
#> 
#> 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 
#>      0.23997498      3.82919908      0.04055524      4.10972929 
fitSumm(obj)
#>              iters
#>                           1
#>   nopar        2.540000e+02
#>   nlogl       -1.015242e+03
#>   maxgrad      1.198324e-04
#>   nobs         8.300000e+02
#>   gcv          1.072679e-01
#>   convergence  0.000000e+00
#>   accrate                NA
#>   nlogl_comp1 -1.070550e+03
#>   nlogl_comp2  5.531180e+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.' 1015.242 (df=254)
AIC(obj)
#> [1] -1522.484
BIC(obj)
#> [1] -323.2414

is(pars(obj))
#> [1] "SCAPars"