Lag Column

Copies column values from preceding rows into the current row. The node can be used to
  1. make a copy of the selected column and shift the cells I steps up (I = lag interval)
  2. make L copies of the selected column and shift the cells of each copy 1, 2, 3, ... L-1 steps up (L = lag)

The lag option L in this node is useful for time series prediction. If the rows are sorted in time increasing order, to apply a lag L to the selected column means to place L-1 past values of the column and the current value of the column on one row.The data table can then be used for time series prediction.

The lag interval option I (periodicity or seasonality) in this node is useful to compare values from the past to the current values. Again if the rows are sorted in time increasing order, to apply a lag interval I means to set aside on the same row the current value and the value occurring I steps before.

L and I can be combined to obtain L-1 copies of the selected column, each one shifted I, 2*I, 3*I, ... (L-1)*I steps backwards.

Options

Lag
L = lag defines how many column copies and how many row shifts to apply
Lag Interval
I = lag interval (sometimes also called periodicity or seasonality) defines how many column copies and how many row shifts to apply
Skip initial incomplete rows
If selected the first rows from the input table are omitted in the output so that the lag output column(s) is not missing (unless the reference data is missing).
Skip last incomplete rows
If selected the rows containing the lagged values of the last real data row are omitted (no artificial new rows). Otherwise new rows are added, which contain missing values in all columns but the new lag output.

Input Ports

Icon
Input data

Output Ports

Icon
Input data with additional columns copying the values from preceding rows.

Views

This node has no views

Workflows

Links

Developers

You want to see the source code for this node? Click the following button and we’ll use our super-powers to find it for you.