| FLSAMs-class | R Documentation | 
"FLSAMs"FLSAMs is a class that stores multiple FLSAM objects in a single container, allowing quick and easy processing and plotting. 
Objects can be created by calls of the form FLSAMs(...).
.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" ~~ 
Class "FLlst", list vector
signature(e1 = "FLSAMs", e2 = "FLStock"): ... 
signature(e1 = "FLStock", e2 = "FLSAMs"): ... 
signature(object = "FLSAMs"): ... 
signature(object = "FLSAMs"): ... 
signature(object = "FLSAMs"): ... 
signature(object = "FLSAMs"): ... 
signature(object = "FLSAMs"): ... 
signature(object = "FLSAMs"): ... 
signature(object = "FLSAMs"): ... 
signature(object = "FLSAMs"): ... 
Mark R. Payne and Niels Hintzen
accessors, HERAS.sams
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.