VectorExtensions.Lag<T>(Vector<T>) Method

Returns a vector whose observations are moved ahead by one observation.

Definition

Namespace: Extreme.DataAnalysis
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
C#
public static Vector<T> Lag<T>(
	this Vector<T> vector
)

Parameters

vector  Vector<T>
The vector to transform.

Type Parameters

T

Return Value

Vector<T>
A vector.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Vector<T>. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Remarks

Each new observation is the observation before the current observation. The first observation is set to NaN.

The new vector gets the name lag1(<name>), where <name> is the name of the original vector.

See Also