Construct blocks of original and lagged values for autoregressive time
series models with exogenous inputs. The typical use case is to supply the
output as newdata
argument to the
predict
method of robust groupwise least
angle regression models.
tsBlocks(x, y, p = 2, subset = NULL, intercept = TRUE)
A matrix containing blocks of original and lagged values of the
time series y
and x
.
a numeric matrix or data frame containing the exogenous predictor series.
a numeric vector containing the response series.
an integer giving the number of lags to include (defaults to 2).
a logical or integer vector defining a subset of observations from which to construct the matrix of predictor blocks.
a logical indicating whether a column of ones should be added to the matrix of predictor blocks to account for the intercept.
Andreas Alfons
predict.tslars
, tslars
,
predict.tslarsP
, tslarsP