Returns a NumericalVariable whose observations are moved ahead by
the specified number of observations.
Namespace: Extreme.Statistics
Assembly: Extreme.Numerics (Extreme.Numerics)
Syntax
| Visual Basic (Declaration) |
|---|
Public Function GetLag ( _ lag As Integer, _ paddedValue As Double _ ) As NumericalVariable |
| C# |
|---|
public NumericalVariable GetLag ( int lag, double paddedValue ) |
| C++ |
|---|
public: NumericalVariable^ GetLag ( int lag, double paddedValue ) |
Parameters
- lag (System.Int32)
- The number of observations to shift the series by.
- paddedValue (System.Double)
- The valuie to be used for values in the new series that don't exist in the original series.
Return Value
A NumericalVariable.
Remarks
A positive value of lag indicates that the observations are shifted forward.
If lag equals 1, then each new observation is the observation before the current observation.
The first lag observations are set to paddedValue.
If lag equals -1, then each new observation is the observation after the current observation.
The last abs(lag) observations are set to paddedValue.
The name of the new variable depends on whether lag is positive or negative. If lag is positive, the new variable gets the name lag<n>(<name>), where <n> is the lag and <name> is the name of the original variable. If lag is positive, the new variable gets the name lead<abs(n)>(<name>).