lagmatrix: Creates Lagmatrix of Estimated Coefficients

Description Usage Arguments Value Examples

View source: R/lagmatrix.R

Description

Creates Lagmatrix of Estimated Coefficients

Usage

1
lagmatrix(fit, model, returnplot = F)

Arguments

fit

Fitted VAR, VARX or VARMA model.

model

Type of model that was estimated: VAR, VARX or VARMA.

returnplot

TRUE or FALSE: return plot of lag matrix or not.

Value

A list with estimated lag matrix of the VAR model, or lag matrices of the VARX or VARMA model. The rows contain the responses, the columns contain the predictors.

Examples

1
2
3
4
data(Y)
data(X)
VARXfit <- sparseVARX(Y=Y, X=X) # sparse VARX
Lhats <- lagmatrix(fit=VARXfit, model="VARX")

YiHou98/bigtime documentation built on Dec. 18, 2021, 7:26 p.m.