coef.glarma: Extract GLARMA Model Coefficients

Description Usage Arguments Details Value See Also Examples

Description

coef is a generic function which extracts GLARMA model coefficients from objects returned by modeling functions. coefficients is an alias for it.

Usage

1
2
## S3 method for class 'glarma'
coef(object, types = "all", ...)

Arguments

object

An object of class "glarma", obtained from a call to glarma.

types

Character; which coefficients to extract, either ARMA), beta, NB or all. The default is all.

...

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
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")

Example output

  theta_1   theta_2   theta_5 
0.2184597 0.1272311 0.0872861 
       Intcpt         Trend     CosAnnual     SinAnnual CosSemiAnnual 
    0.1299754    -3.9283714    -0.0991262    -0.5308445     0.2111276 
SinSemiAnnual 
   -0.3932302 
$ARMA
  theta_1   theta_2   theta_5 
0.2184597 0.1272311 0.0872861 

$beta
       Intcpt         Trend     CosAnnual     SinAnnual CosSemiAnnual 
    0.1299754    -3.9283714    -0.0991262    -0.5308445     0.2111276 
SinSemiAnnual 
   -0.3932302 

glarma documentation built on May 2, 2019, 6:33 a.m.