lagmat: Creates Lagged cwVariablesMatrix for AR Models

Description Usage Arguments Value Author(s) References Examples

Description

Given the time series and the order p of the AR series, this function returns the lagged variables of order p. The lagged response is in the first column followed by the lagged x's in increasing order.

Usage

1
lagmat(x, p)

Arguments

x

time series

p

order of the AR series

Value

xmat

a matrix with p+1 columns, the first column is the lagged response, the remaining columns are the lagged x's in increasing order.

Author(s)

Joe McKean mckean@wmich.edu and John Kloke kloke@biostat.wisc.edu

References

Kloke, J. and McKean, J.W. (2014), Nonparametric statistical methods using R, Boca Raton, FL: Chapman-Hall.

Examples

1
2
x <- rnorm(40)
xlags <- lagmat(x,4)

kloke/npsmReg2 documentation built on May 20, 2019, 12:34 p.m.