To check RATS, I coded the YW equations two ways,
by matrix inversion and the Durbin-Levinson recursion.
Both these methods agreed precisely with RATS
which, in turn, agrees with the output from the
time series econometrics packages TSP.
The S-Plus output is different, and this makes
me wonder.
> x <- scan("c:\\data\\bjse.prn")
> aryw <- ar.yw(x, order.max = 5, aic = F)
> aryw$ar
, , 1
[,1] RATS, TSP, my calculations
[1,] 1.373519778 0.81
[2,] -0.785582066 -0.63
[3,] 0.165035501 0.08
[4,] -0.062701538 -0.06
[5,] 0.001139705 0.00
Another method of calculating partial autocorrelation
coefficients is by least squares. Under certain conditions,
least-squares and YW estimates will be very close. (Series E
does not fulfill these conditions, but Series D does.)
For such series, the RATS/TSP YW estimates, coincide with
least squares estimates, wherease the S-Plus YW estimates
do not.
Can anyone shed light on this anomaly?
Examing the code for ar.yw I see many references
to storage.mode() <- "single". Could it be that the
ar.yw is coded in single precision? Box and Jenkins (1976)
specifically note the susceptibility to rounding error of
YW estimates.
Additionally, has anyone got a benchmark for Burg's method?
I have coded my own, but it disagrees with yw.burg
Thanks,
Bruce
-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu. To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message: unsubscribe s-news