Skip to contents

Object of the predictModel class are used in various FLR classes to allow flexible modelling of the dynamics of different biological and technological processes.

Usage

# S4 method for FLQuants,formula
predictModel(object, model, params = FLPar())

# S4 method for FLQuants,missing
predictModel(object, params = FLPar())

# S4 method for FLQuants,character
predictModel(object, model, params = FLPar())

# S4 method for FLQuants,`function`
predictModel(object, model, params = FLPar())

# S4 method for FLQuants,list
predictModel(object, model, params = FLPar())

# S4 method for missing,ANY
predictModel(object, model, ...)

Details

The dependency of life history processes, such as maturity and fecundity, to biological and environmental factors, can be represented in objects of this class via a simple model (represented by a formula) and the corresponding paramaters (FLPar) and inputs (FLQuants).

Slots

.Data

Inputs to the model not found in enclosing class (FLQuants).

model

Model representation (formula).

params

Model paramaters (FLPar).

Validity

VALIDITY

Neque porro quisquam est qui dolorem ipsum.

You can inspect the class validity function by using getValidity(getClassDef('predictModel'))

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.

Methods

Methods exist for various calculations based on values stored in the class:

METHOD

Neque porro quisquam est qui dolorem ipsum.

See also

Author

The FLR Team

Examples

fec <- FLQuants(fec=FLQuant(rlnorm(10, 20, 5),
  dimnames=list(year=2000:2009), units='1'))
predictModel(fec, model=~fec)
#> $ fec 
#> An object of class "FLQuant"
#> , , unit = unique, season = all, area = unique
#> 
#>      year
#> quant 2000       2001       2002       2003       2004       2005      
#>   all 9.8574e+11 1.9984e+07 2.2304e+11 1.7749e+07 1.1891e+08 1.7651e+09
#>      year
#> quant 2006       2007       2008       2009      
#>   all 1.8672e+10 4.3596e+09 1.2268e+11 4.0840e+06
#> 
#> units:  1 
#> 
#> model:  
#> ~fec
#> <environment: R_EmptyEnv>
#> 
#> params:  
#> An object of class "FLPar"
#> params
#>    
#> NA 
#> units:  NA 
predictModel(fec)
#> $ fec 
#> An object of class "FLQuant"
#> , , unit = unique, season = all, area = unique
#> 
#>      year
#> quant 2000       2001       2002       2003       2004       2005      
#>   all 9.8574e+11 1.9984e+07 2.2304e+11 1.7749e+07 1.1891e+08 1.7651e+09
#>      year
#> quant 2006       2007       2008       2009      
#>   all 1.8672e+10 4.3596e+09 1.2268e+11 4.0840e+06
#> 
#> units:  1 
#> 
#> model:  
#> ~NA
#> <environment: R_EmptyEnv>
#> 
#> params:  
#> An object of class "FLPar"
#> params
#>    
#> NA 
#> units:  NA 
predictModel(fec, model="bevholt")
#> $ fec 
#> An object of class "FLQuant"
#> , , unit = unique, season = all, area = unique
#> 
#>      year
#> quant 2000       2001       2002       2003       2004       2005      
#>   all 9.8574e+11 1.9984e+07 2.2304e+11 1.7749e+07 1.1891e+08 1.7651e+09
#>      year
#> quant 2006       2007       2008       2009      
#>   all 1.8672e+10 4.3596e+09 1.2268e+11 4.0840e+06
#> 
#> units:  1 
#> 
#> model:  
#> rec ~ a * ssb/(b + ssb)
#> <environment: R_EmptyEnv>
#> 
#> params:  
#> An object of class "FLPar"
#> params
#>    
#> NA 
#> units:  NA 
predictModel(fec, model=bevholt)
#> $ fec 
#> An object of class "FLQuant"
#> , , unit = unique, season = all, area = unique
#> 
#>      year
#> quant 2000       2001       2002       2003       2004       2005      
#>   all 9.8574e+11 1.9984e+07 2.2304e+11 1.7749e+07 1.1891e+08 1.7651e+09
#>      year
#> quant 2006       2007       2008       2009      
#>   all 1.8672e+10 4.3596e+09 1.2268e+11 4.0840e+06
#> 
#> units:  1 
#> 
#> model:  
#> rec ~ a * ssb/(b + ssb)
#> <environment: R_EmptyEnv>
#> 
#> params:  
#> An object of class "FLPar"
#> params
#>    
#> NA 
#> units:  NA 
predictModel(fec, model=bevholt())
#> $ fec 
#> An object of class "FLQuant"
#> , , unit = unique, season = all, area = unique
#> 
#>      year
#> quant 2000       2001       2002       2003       2004       2005      
#>   all 9.8574e+11 1.9984e+07 2.2304e+11 1.7749e+07 1.1891e+08 1.7651e+09
#>      year
#> quant 2006       2007       2008       2009      
#>   all 1.8672e+10 4.3596e+09 1.2268e+11 4.0840e+06
#> 
#> units:  1 
#> 
#> model:  
#> rec ~ a * ssb/(b + ssb)
#> <environment: R_EmptyEnv>
#> 
#> params:  
#> An object of class "FLPar"
#> params
#>    
#> NA 
#> units:  NA 
predictModel(model=rec~a*ssb, params=FLPar(a=1.234))
#> An object of class "FLQuants": EMPTY
#> model:  
#> rec ~ a * ssb
#> <environment: R_EmptyEnv>
#> 
#> params:  
#> An object of class "FLPar"
#> params
#>    a 
#> 1.23 
#> units:  NA 
predictModel(model=bevholt, params=FLPar(a=1.234))
#> An object of class "FLQuants": EMPTY
#> model:  
#> rec ~ a * ssb/(b + ssb)
#> <environment: R_EmptyEnv>
#> 
#> params:  
#> An object of class "FLPar"
#> params
#>    a 
#> 1.23 
#> units:  NA 
predictModel(model="bevholtss3", params=FLPar(a=1.234))
#> An object of class "FLQuants": EMPTY
#> model:  
#> rec ~ (4 * s * R0 * ssb)/(v * (1 - s) + ssb * (5 * s - 1))
#> <environment: R_EmptyEnv>
#> 
#> params:  
#> An object of class "FLPar"
#> params
#>    a 
#> 1.23 
#> units:  NA