MichaelChirico / r-bugs

A ⚠️read-only⚠️mirror of https://bugs.r-project.org/
20 stars 0 forks source link

[BUGZILLA #10455] Bug in pacf -- Proposed patch #3218

Open MichaelChirico opened 4 years ago

MichaelChirico commented 4 years ago

From: "Simone Giannerini" <sgiannerini@<::CENSORED -- SEE ORIGINAL ON BUGZILLA::>> Dear all,

following the thread

http://tolstoy.newcastle.edu.au/R/e2/devel/07/09/4338.html

regarding the bug in the partial autocorrelation function for multivariate time series. I have prepared a web page with patches and relevant information.

http://www2.stat.unibo.it/giannerini/R/pacf.htm

Please do not hesitate to contact me for further clarifications

regards

Simone

--


Simone Giannerini Dipartimento di Scienze Statistiche "Paolo Fortunati" Universita' di Bologna Via delle belle arti 41 - 40126 Bologna, ITALY <CENSORING FROM DETECTED PHONE NUMBER ONWARDS; SEE BUGZILLA>


METADATA

MichaelChirico commented 4 years ago

(In reply to elin.waring from comment #6)

I read the original email thread.  Prof. Giannerini finshed by saying
possibly a fix could be made but possibly  a citation for the method used
could be provided.

Giannerini suggested that

As I mentioned in private I suspect that pacf() in the multivariate case
computes the
partial autoregression matrix (in the terminology of Reinsel) rather than
the partial autocorrelation matrix
as the two coincide in the univariate case but are different in the
multivariate case as stated explicitly
in Reisel (Sec. 3.3).
This would explain the coefficients well above 1 (in modulus) in the example
I have given.

He had posted code on a web page at one point but that page is no loner
available.

Dear Elin,

I remember I had a closer look at the original code and I could not find an easy way to fix the bug (there were many problems). At the time I had also correspondence with at least one R-core member (Stefano Iacus) and later with Duncan Murdoch, but apparently they did not have time/interest to look into the matter. For such reasons I found it easier to re-write from scratch the multivariate pacf routine by following the multivariate Durbin-Levinson algorithm defined in Wei (1990, first ed.). This is what I have and if there is interest I can make it available again, please let me know.

For the record, I have a pure R implementation and a Fortran one.

Kind regards,

Simone


Simone Giannerini Dipartimento di Scienze Statistiche "Paolo Fortunati" Universita' di Bologna Via delle belle arti 41 - 40126 Bologna, ITALY <CENSORING FROM DETECTED PHONE NUMBER ONWARDS; SEE BUGZILLA>


METADATA

MichaelChirico commented 4 years ago

Perhaps someone from R-core could suggest how to proceed. Would it make sense to start a new thread on the mailing list?


METADATA