[R] pacf, round two

Christian Kleiber Kleiber at statistik.uni-dortmund.de
Wed Jun 21 18:46:55 CEST 2000


Dear Professor Ripley,

> > Dear list,
> >
> > according to the documentation of acf{ts}
> >
> > "the partial correlation coefficient is estimated by fitting
> > autoregressive models of successively higher orders up to lag.max. "
> >
> > However, R seems to return the Yule-Walker estimates of the PACF by
> > default.
>
> R provides four methods to `Fit Autoregressive Models to Time
> Series' in function ar(), and the default there is indeed Yule-Walker, so
> this seems self-consistent.

My remark concerned acf() and pacf(), not ar().

> It does not say `running autoregressions', and I believe it to be standard
> in the time-series field to fit autoregressive models *by Yule-Walker* to
> estimate pacfs.  Indeed, in the first two books I have just looked in, that
> is the definition of the sample PACF (in the univariate case).  So I don't
> think these are `the Yule-Walker estimates of the PACF' but the `sample
> PACF'.

I have little to disagree with your remarks on standard procedures and textbook
definitions. It is indeed standard in the time series field to estimate AR
models, as well as the ACF and PACF, by Yule-Walker. Hence, what R and S do is
standard. Still, there are other - infrequently used - estimators for the PACF,
e.g. OLS or the Burg method. What acf() and pacf() return are the Yule-Walker
estimates of the PACF.

A leading text, Brockwell and Davis 1991 (I assume our bookshelves are not
disjoint?), defines the theoretical PACF in two different ways (YW, OLS) and
shows that both definitions are equivalent. Later, the sample PACF is solely
defined via YW. In contrast, Box and Jenkins (1976, p. 65) mention YW and OLS
estimators and note that the former "should not be used if the values of the
[AR] parameters are close to the nonstationary boundaries". This is common for,
e.g., economic time series.

Apparently I read too much into the documentation. From  (acf{ts})

``For `type' = `"correlation"' and `"covariance"', the estimates are based on
the sample covariance.
The partial correlation coefficient is estimated by fitting autoregressive
models of successively higher orders up to `lag.max'."

I concluded - as it turned out, erroneously - that R provides estimates based
on OLS. As R employs YW, the documentation could read

``For * all types * the estimates are based on the sample autocovariances."

The remark on the PACF seemed to imply that things are done differently here,
and I was surprised to find that R returns YW estimates. After all, ``fitting
autoregressive models of successively higher orders" is ambiguous.

> I assume by `running autoregressions' you mean what ar.ols does:
> if that is what you want that is provided too.  But it is not the only nor
> even the
> usual meaning of `fitting' an AR(p) model to time-series data, especially
> assuming stationarity (as the definitions of acf and pacf do).
>
> I am a bit of a loss as to what your point was.  Are you really suggesting
> that what R (and S) does is not absolutely standard using standard
> terminology?  If so your bookshelf must be a disjoint set from mine.

In the S-PLUS Help on acf() one finds

"... For the partial autocorrelation function, the Levinson-Durbin recursion is
used to fit AR(p) models to x successively for p = 1, ..., lag.max, and from
the AR-coefficients the partial autocorrelation function values are derived."

This is unambiguous. I feel R users would be better off if the algorithm
employed by pacf() was identified in help(pacf). I found the R documentation
somewhat vague, if not misleading. I still do.

Best regards,
Christian Kleiber

NB:    Sorry for the long reply, but I believe the issue is of some interest to
R users.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: Kleiber.vcf
Type: text/x-vcard
Size: 324 bytes
Desc: Visitenkarte für Christian Kleiber
Url : https://stat.ethz.ch/pipermail/r-help/attachments/20000621/763026a4/Kleiber.vcf


More information about the R-help mailing list