lag_data: Lag a matrix of variables a specific number of lags for each...

View source: R/explain_forecast.R

lag_dataR Documentation

Lag a matrix of variables a specific number of lags for each variables.

Description

Lag a matrix of variables a specific number of lags for each variables.

Usage

lag_data(x, lags)

Arguments

x

The matrix of variables (one variable per column).

lags

A numeric vector denoting how many lags each variable should have.

Value

A list with two items

  • A matrix, lagged with the lagged data.

  • A list, group, with groupings of the lagged data per variable.


NorskRegnesentral/shapr documentation built on April 19, 2024, 1:19 p.m.