After an RSiteSeach("Box.test") I found some discussion regarding the degrees of freedom in the computation of the Ljung-Box test using Box.test(), but did not find any posting about the proper degrees of freedom. Box.test() uses "lag=number" as the degrees of freedom. However, I believe the correct degrees of freedom should be "number-p-q" where p and q are the number of estimated parameters (for instance, in a Box-Jenkins family of models). This, according to the main source in documentation of Box.test: G. M. Ljung and G. E. P. Box, On a measure of Lack of Fit in Time Series Models, Biometrika, Vol. 65, No. 2 (August, 1978), pp. 297-303. One can still compute the correct p-value with>1-pchisq(value,correctdf)Nestor (R 2.2.1 on Linux, Suse 9.3) -- Nestor M. Arguea, Chair Department of Marketing and Economics University of West Florida 11000 University Parkway Pensacola, FL 32514 Phone: (850)474-3071 Fax: (850)474-3069
You are saying that the penalty on the degrees of freedom should be the same whether the model was fit with 100 observations or 1 million observations. You are also saying that some tests should have negative degrees of freedom. So I don't think your proposal is the right answer, though presumably there should be some penalty. There is a working paper on the Burns Statistics website about robustness in Ljung-Box tests, but this issue is not one that is covered. Patrick Burns patrick at burns-stat.com +44 (0)20 8525 0696 http://www.burns-stat.com (home of S Poetry and "A Guide for the Unwilling S User") Nestor Arguea wrote:>After an RSiteSeach("Box.test") I found some discussion regarding the degrees >of freedom in the computation of the Ljung-Box test using Box.test(), but did >not find any posting about the proper degrees of freedom. > >Box.test() uses "lag=number" as the degrees of freedom. However, I believe >the correct degrees of freedom should be "number-p-q" where p and q are the >number of estimated parameters (for instance, in a Box-Jenkins family of >models). This, according to the main source in documentation of Box.test: > >G. M. Ljung and G. E. P. Box, On a measure of Lack of Fit in Time Series >Models, Biometrika, Vol. 65, No. 2 (August, 1978), pp. 297-303. > >One can still compute the correct p-value with > > > >>1-pchisq(value,correctdf) >> >> > > >Nestor >(R 2.2.1 on Linux, Suse 9.3) > > >