I believe tsdiag() uses the correct degrees of freedom in applying Box.test, but the graphic shows "lag" on the horizontal axis when it should display "degrees of freedom".
raf.rossignol wrote: > > Hello, > > Prof Brian Ripley wrote: >> >> I think you are referring to its application to the residuals of an >> ARMA(p, q) fit, and that is not what Box.test says it does. >> >> It is very easy to edit the code if you want to use a different degrees >> of >> freedom. >> > I am also new to R, but it seems to me that there is still something > confusing, not in Box.test but in tsdiag.Arima > Indeed, the help of tsdiag says "The methods for 'arima' and 'StructTS' > [...] use the Ljung-Box version of the portmanteau test." > So we could expect the degrees of freedom 'h-p-q' to be used, but a look > at tsdiag.Arima shows it uses Box.test at lags h=1:gof.lag, with degrees > of freedom equal to h, and not h-p-q. Do you think this is a mistake in > tsdiag.Arima or is there some experimental (or theoretical) reason > supporting this choice ? > Best regards > > > ----- 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-tp17277964p18907921.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.