No, the df are H-(p+q), against what your intuition tells you. The problem is that you're thinking of the residuals as losing a df for each parameter, but the asymptotics of the problem involve the sample autocorrelations of the residuals. You can read the details in the original paper by Box and Pierce (?Box.test for the reference). By the way, you're not alone, Minitab makes the same mistake you did.
raf.rossignol wrote: > > > > David Stoffer wrote: >> >> I stand corrected. I thought I checked this a long time ago, but >> apparently not. tsdiag.Arima DOES NOT use the fact that the series it is >> testing (or diagnosing, if you will) are residuals from an ARIMA fit. >> >> I keep a list of R time series bloopers here: >> http://www.stat.pitt.edu/stoffer/tsa2/Rissues.htm along with some >> work-arounds over here: >> http://www.stat.pitt.edu/stoffer/tsa2/Examples.htm >> >> > Thanks, > > by the way, if an intercept is included in the model (which is the default > setting for arima()), it seems to me that the good number of degrees of > freedom sould be (h-p-q-1). Do you agree ? > > ----- The power of accurate observation is commonly called cynicism by those who have not got it. George Bernard Shaw -- View this message in context: http://www.nabble.com/Box.test-degrees-of-freedom-tp17277964p18926678.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.