Returns a
NumericalVariable whose observations are moved ahead by
the specified number of observations.
Namespace: Extreme.StatisticsAssembly: Extreme.Numerics.Net40 (in Extreme.Numerics.Net40.dll) Version: 6.0.16073.0 (6.0.17114.0)
public NumericalVariable GetLag(
int lag
)
Public Function GetLag (
lag As Integer
) As NumericalVariable
public:
NumericalVariable^ GetLag(
int lag
)
member GetLag :
lag : int -> NumericalVariable
Parameters
- lag
- Type: SystemInt32
The number of observations to shift the series by.
Return Value
Type:
NumericalVariableA
NumericalVariable.
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 NaN.
If lag equals -1, then each new observation is the observation after the current observation.
The last abs(lag) observations are set to NaN.
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>).
Numerical Libraries
Supported in: 5.x, 4.x
Reference