| coef.glarma {glarma} | R Documentation |
Extract GLARMA Model Coefficients
Description
coef is a generic function which extracts GLARMA model coefficients
from objects returned by modeling functions. coefficients is an alias
for it.
Usage
## S3 method for class 'glarma'
coef(object, types = "all", ...)
Arguments
object |
An object of class |
types |
Character; which coefficients to extract, either
|
... |
Further arguments passed to or from other methods. |
Details
This is an S3 generic function. coef or coefficients
return the requested coefficients from the object of class
"glarma". By changing the argument type, either the ARMA
coefficients (ARMA), regression coefficients (beta) or
all coefficients are returned. In the case of negative binomial
counts, the negative binomial coefficient \alpha is also
returned if type is all, or if type is NB. The default
is all.
Value
ARMA coefficients, beta coefficients, NB
coefficients or all of these three types of coefficients are extracted
from the glarma model object object.
A named numeric vector or list of named numeric vectors is returned.
See Also
fitted.glarma and residuals.glarma for
related methods;
Examples
data(Polio)
Y <- Polio[, 2]
X <- as.matrix(Polio[, 3:8])
glarmamod <- glarma(Y, X, thetaLags = c(1, 2, 5), type = "Poi",
method = "FS", residuals= "Pearson",
maxit = 100, grad = 1e-6)
coef(glarmamod, type = "ARMA")
coef(glarmamod, type = "beta")
coef(glarmamod, type = "all")