IMSL C# Numerical Library

ARAutoUnivariate Class

Automatically determines the best autoregressive time series model using Akaike's Information Criterion.

For a list of all members of this type, see ARAutoUnivariate Members.

System.Object
   Imsl.Stat.ARAutoUnivariate

public class ARAutoUnivariate

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

ARAutoUnivariate automatically selects the order of the AR model that best fits the data and then computes the AR coefficients. The algorithm used in ARAutoUnivariate is derived from the work of Akaike, H., et. al (1979) and Kitagawa and Akaike (1978). This code was adapted from the UNIMAR procedure published as part of the TIMSAC-78 Library.

The best fit AR model is determined by successively fitting AR models with 0,1,2,\dots,\mbox{maxlag} autoregressive coefficients. For each model, Akaike's Information Criterion (AIC) is calculated based on the formula

\mbox{AIC} = -2\ln(likelihood)+2p
Class ARAutoUnivariate uses the approximation to this formula developed by Ozaki and Oda (1979),
\mbox{AIC} \approx (n-\mbox{maxlag})\ln({\hat {\sigma}}^2)+2(p+1)+(n-\mbox{maxlag})(\ln(2\pi)+1)
where {\hat {\sigma}}^2 is an estimate of the residual variance of the series, commonly known in time series analysis as the innovation variance and n is the number of observations in the time series z, n=z.Length. By dropping the constant
(n-\mbox{maxlag})(\ln(2\pi)+1),
the calculation is simplified to
\mbox{AIC} \approx (n-\mbox{maxlag})\ln({\hat {\sigma}}^2)+2(p+1),

The best fit model is the model with minimum AIC. If the number of parameters in this model selected by ARAutoUnivariate is equal to the highest order autoregressive model fitted, i.e., p=maxlag, then a model with smaller AIC might exist for larger values of maxlag. In this case, increasing maxlag to explore AR models with additional autoregressive parameters might be warranted.

Property EstimationMethod can be used to specify the method used to calculate the AR coeficients. If EstimationMethod is set to MethodOfMoments, estimates of the autoregressive coefficients for the model with minimum AIC are calculated using method of moments as described in the ARMA class. If LeastSquares is specified, the coefficients are determined by the method of least squares applied in the form described by Kitagawa and Akaike (1978). If MaximumLikelihood is specified, the coefficients are estimated using maximum likelihood as described in the ARMAMaxLikelihood class.

Requirements

Namespace: Imsl.Stat

Assembly: ImslCS (in ImslCS.dll)

See Also

ARAutoUnivariate Members | Imsl.Stat Namespace | Wolfer Sunspot Example | Canadian Lynx Example with Forecasting