FLSAMs: Class '"FLSAMs"'

FLSAMs-classR Documentation

Class "FLSAMs"

Description

FLSAMs is a class that stores multiple FLSAM objects in a single container, allowing quick and easy processing and plotting.

Objects from the Class

Objects can be created by calls of the form FLSAMs(...).

Slots

.Data:

The data "list" ~~

names:

Names of the elements "character" ~~

desc:

Description of the object "character" ~~

lock:

Lock mechanism. If turned on. the length of the list cannot be modified by adding or removing elements "logical" ~~

Extends

Class "FLlst", list vector

Methods

+

signature(e1 = "FLSAMs", e2 = "FLStock"): ...

+

signature(e1 = "FLStock", e2 = "FLSAMs"): ...

catchabilities

signature(object = "FLSAMs"): ...

coefficients

signature(object = "FLSAMs"): ...

coef

signature(object = "FLSAMs"): ...

f

signature(object = "FLSAMs"): ...

FLSAMs

signature(object = "FLSAMs"): ...

lr.test

signature(object = "FLSAMs"): ...

obs.var

signature(object = "FLSAMs"): ...

power.law.exps

signature(object = "FLSAMs"): ...

Author(s)

Mark R. Payne and Niels Hintzen

See Also

accessors, HERAS.sams

Examples

data(NSH)
data(NSH.sam)

#Modify HERAS catchability bindings systematically
#Note that this is the same code used to create the
#HERAS.sams data object
ctrl.list <- list(all.free=3:10,
                  four.lvls=c(3,3,4,4,5,5,6,6),
                  three.lvls=c(3,3,4,4,5,5,5,5),
                  two.lvls=c(3,3,3,4,4,4,4,4))

ctrls <- lapply(ctrl.list,
  function(x) {
    tmp.ctrl <- NSH.ctrl
    tmp.ctrl@catchabilities["HERAS",ac(1:8)] <- x
    return(update(tmp.ctrl))
})

sam.list <- lapply(ctrls,FLSAM,stck=NSH,tun=NSH.tun)                  
HERAS.sams <- FLSAMs(sam.list)

#Plot results
plot(HERAS.sams)

#Plot catchability coefficients for different levels
qs.dat <- catchabilities(HERAS.sams)
xyplot(value ~ age,data=qs.dat,groups=name,type="b",
    subset=fleet=="HERAS",auto.key=TRUE)  

#Update stock object
NSH.HERAS <- NSH + HERAS.sams
plot(NSH.HERAS)

#Compare models with AIC
HERAS.aics <-AIC(HERAS.sams)
plot(HERAS.aics,xaxt="n",xlab="Model",ylab="AIC")
axis(1,at=seq(HERAS.aics),labels=names(HERAS.aics)) #three lvls looks best

flr/FLSAM documentation built on April 28, 2024, 9:06 p.m.