Gets the auto-correlation of a numerical variable.
Namespace: Extreme.Statistics
Assembly: Extreme.Numerics (Extreme.Numerics)
Syntax
| Visual Basic (Declaration) |
|---|
Public Shared Function Autocorrelation ( _ data As NumericalVariable, _ lag As Integer _ ) As Double |
| C# |
|---|
public static double Autocorrelation ( NumericalVariable data, int lag ) |
| C++ |
|---|
public: static double Autocorrelation ( NumericalVariable^ data, int lag ) |
Parameters
- data (Extreme.Statistics.NumericalVariable)
- A NumericalVariable object.
- lag (System.Int32)
- The lag at which to evaluate the autocorrelation.
Return Value
The auto-correlation of the observations of data with lag lag.
Exceptions
| Exception | Condition |
|---|---|
| ArgumentNullException | data is nullNothingnullptr. |
| ArgumentOutOfRangeException | lag is greater than or equal to the length of data. |