glarma (version 1.6-0)

model.frame.glarma: 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

# S3 method for 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.

Value

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

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.

See Also

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

Examples

Run this code
# NOT RUN {
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))
# }

Run the code above in your browser using DataLab