parameters {mixAR} | R Documentation |
Set or extract the parameters of MixAR objects
Description
Set or extract the parameters of MixAR objects.
Usage
parameters(model, namesflag = FALSE, drop = character(0))
parameters(model) <- value
## S4 replacement method for signature 'MixAR'
parameters(model) <- value
## S4 replacement method for signature 'ANY'
parameters(model) <- value
Arguments
model |
a model. |
namesflag |
if TRUE, generate names. |
drop |
names of parameters not to include in the returned value, a character vector. The default is to return all parameters, see Details. |
value |
values of the parameters, numeric. |
Details
This is a generic function. The dispatch is on argument model
.
The default calls coef
.
parameters
extracts the parameters of a MixAR object. It
returns a numeric vector. If namesflag
is TRUE
the
returned vector is named, so that the parameters can be referred to by
names. Argument drop
is a character vector giving names of
parameters not to be included in the returned value.
This function can be useful for setting parameters from optimisation routines.
set_parameters
is deprecated,
use parameters(model) <- value
instead.
Value
a vector of parameters, maybe with names.
Methods
signature(model = "ANY")
signature(model = "MixAR")
Examples
parameters(exampleModels$WL_ibm)
parameters(exampleModels$WL_ibm, namesflag = TRUE)
## drop orders
parameters(exampleModels$WL_ibm, namesflag = TRUE, drop = "order")
## drop orders and mixing weights
parameters(exampleModels$WL_ibm, namesflag = TRUE, drop = c("order", "prob"))
parameters(exampleModels$WL_I, namesflag = TRUE)
parameters(exampleModels$WL_II, namesflag = TRUE)