Learn R Programming

glarma (version 1.7-1)

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, ...)

Value

A data frame with the variables used in the fitted

glarma model.

Arguments

formula

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

...

Further arguments passed to or from other methods.

Author

Cenanning Li <cli113@aucklanduni.ac.nz>

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
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