Description Slots Extends Constructor Methods Author(s) See Also Examples
The FLModel class provides a virtual class that developers of various statistical models can use to implement classes that allow those models to be tested, fitted and presented.
Slots in this class attempt to map all the usual outputs for a modelling
exercise, together with the standard inputs. Input data is stored in slots
created by each of those classes based on FLModel.See, for example
FLSR
for a class used for stock-recruitment models.
Various fitting algorithms, similar to those present in the basic R packages are
currently available for FLModel, including fmle
, nls-FLCore
and glm
.
Name of the object. character
.
Description of the object. character
.
Range. numeric
.
Estimated values for rec. FLQuant
.
Residuals obtained from the model fit. FLQuant
.
Model formula. formula
.
Function returning the gradient of the likelihood. function
.
Log-likelihood function. function
.
Function returning initial parameter values for the optimizer, as an object of class FLPar
. function
.
Estimated parameter values. FLPar
.
Value of the log-likelihood. logLik
.
Variance-covariance matrix. array
.
Hessian matrix obtained from the parameter fitting. array
.
extra information on the model fit procedure. list
.
FLComp
Constructor method for objects of class FLModel
. This method is to be called by the constructor methods of classes extending FLModel
.
An argument class
instructs the constructor about the exact class of the returned object. Constructor methods for FLModel
-based class should simply invoke this method with the appropriate class argument (See example below).
First argument is a formula describing the model, to be placed in the model
slot.
Arguments, if given, are parsed and allocated by name to a iven slot. If none if provided, and empty FLModel
object is returned.
A function returning a list with names equal to one or more of the slots in the class is called, and elements in that list are allocated by name. See SRModels
for uses of this mechanism
A function with his name is called, as above.
Describe method
signature(object=FLModel,k=numeric)
Describe method
signature(object=FLModel,k=missing)
Describe method
signature(object=missing)
Describe method
signature(object=missing,start=missing)
Describe method
signature(formula=FLModel,data=missing,start=missing,control=missing,algorithm=missing,trace=missing,subset=missing,weights=missing,na.action=missing,model=missing,lower=missing,upper=missing)
The FLR Team
AIC, BIC, fmle, nls, FLComp
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | # Normally, FLModel objects won't be created, as class lacks input slots
summary(FLModel(length~width*alpha))
# Objects of FLModel-based classes use their own constructor,
# which internally calls FLModel
fsr <- FLModel(rec~ssb*a, class='FLSR')
is(fsr)
summary(fsr)
# An example constructor method for an FLModel-based class
# create FLGrowth class with a single new slot, 'mass'
setClass('FLGrowth', representation("FLModel",
mass='FLArray'))
# define creator method, based on FLModel()
setGeneric('FLGrowth', function(object, ...)
standardGeneric('FLGrowth'))
setMethod('FLGrowth', signature(object='ANY'),
function(object, ...)
FLModel(object, class='FLGrowth', ...))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.