Dew Stats Master .NET
BoxLjung Routine
Summary
The box-Ljung statistics.

Unit
StatTimeSerAnalysis

Declaration
Function BoxLjung(X: TVec; h: Integer): TSample;
 Parameter  Description 
Defines the residuals of predicted values. 
Defines the number of lags used in statistics. 
Result
the Box-Ljung statistics.
Description
The Ljung-Box test is based on the autocorrelation plot. However, instead of testing randomness at each distinct lag, it tests the "overall" randomness based on a number of lags. For this reason, it is often referred to as a "portmanteau" test. The Ljung-Box test statistics cam be defined as follows:

where n is the sample size, rho(j) is the autocorrelation at lag j, and h is the number of lags being tested. Actually we are testing the hypothesis:

The Ljung-Box test is commonly used in ARIMA modeling. Note that it is applied to the residuals of a fitted ARIMA model, not the original series.
Categories
ARMA and ARIMA routines

Copyright 2008 Dew Research
http://www.dewresearch.com