Re: [R] Box.test degrees of freedom

From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
Date: Fri, 16 May 2008 20:15:36 +0100 (BST)

Bear in mind that Box.test knows nothing about p or q: it says

      Compute the Box-Pierce or Ljung-Box test statistic for examining
      the null hypothesis of independence in a given time series.

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.

On Fri, 16 May 2008, Nuno Prista wrote:

> Dear colleagues,
>
> I am new to R and statistics so please keep that in mind.
>
> I have doubts on the df calculation of Ljung-Box test (Box.test). The
> function seems to use always the df=lag=m and not df=m-p-q like suggested in
> Ljung and Box (1978) paper (that is referenced).
>
> Do you agree with this? If so, is there an R package function that computes
> Ljung-Box test with the degrees of freedom as described in Ljung and Box
> (1978) paper?
>
> Note: this issue was discussed in
> http://tolstoy.newcastle.edu.au/R/help/06/03/22768.html (and thread) but it
> seems with little consensus.
>
> Thanks in advance,
>
> Nuno
> ______________________________________________
>
> Centro de Oceanografia - IO-FCUL, Portugal
> Center for Quantitative Fisheries Ecology - ODU, USA
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help_at_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.
>

-- 
Brian D. Ripley,                  ripley_at_stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
R-help_at_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.
Received on Fri 16 May 2008 - 19:37:28 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 08 Aug 2008 - 10:33:21 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive