nobs.glarma: Extract the Number of Observations from a GLARMA Model Fit

Description Usage Arguments Value Author(s) See Also Examples

View source: R/accessors.R

Description

An accessor function used to extract the number of observations from a "glarma" object.

Usage

1
2
## S3 method for class 'glarma'
nobs(object, ...)

Arguments

object

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

...

Further arguments passed to or from other methods.

Value

The number of observations extracted from the object object.

Author(s)

"Cenanning Li" <[email protected]>

See Also

coef.glarma, residuals.glarma, fitted.glarma, glarma.

Examples

1
2
3
4
5
6
7
8
9
### Example from Davis, Dunsmuir Wang (1999)
## MA(1,2,5), Pearson Residuals, Fisher Scoring
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 = 2.22e-16)

nobs(glarmamod)

Example output

[1] 168

glarma documentation built on May 29, 2017, 11:24 p.m.