Extracting the Model Frame of the GLARMA Model

Description

model.frame (a generic function) and its methods return a data frame with the variables that are used in the glarma model.

Usage

1
2
## S3 method for class 'glarma'
model.frame(formula, ...)

Arguments

formula

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

...

Further arguments passed to or from other methods.

Details

This is an S3 generic function. It extracts the response variable vector and the matrix of the explanatory variables from the object of class "glarma", and combines them as a data frame.

Value

A data frame with the variables used in the fitted glarma model.

Author(s)

Cenanning Li <cli113@aucklanduni.ac.nz>

See Also

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
data(Polio)
print(y <- Polio[, 2])
X <- as.matrix(Polio[, 3:8])
str(X)
head(X)


glarmamod <- glarma(y, X, thetaLags = c(1, 2, 5), type = "Poi",
                    method = "FS", residuals = "Pearson",
                    maxit = 100, grad = 1e-6)

str(model.frame(glarmamod))
head(model.frame(glarmamod))