Computes the local autocovariance from the uncorrected Haar spectrum of a process.
Takes:
uncspec | The uncorrected Haar spectrum of a process. To obtain the spectrum, use uncor.spec. |
lag | Autocovariance lag. Setting lag = 0 gives the local variance. |
req.length | The required length of the local autocovariance vector. The routine returns req.length values of the local autocovariance at the end of the series. |
smooth | Logical switch: T smooths the local autocovariance, F leaves it unsmoothed. |
kernel | The kernel to be used in smoothing. Like in ksmooth, can be set to "box", "triangle", "parzen" or "normal". Also see help(ksmooth) in S-Plus. |
g | The value of the bandwidth for kernel smoothing. |
extrap.lag | Apart from the vector of local autocovariances, the routine also returns an extrapolated autocovariance Cov(x[t+extrap.lag], x[t+extrap.lag-lag]), where uncspec = uncor.spec(x) and t is the length of x. This value is needed for the Yule-Walker matrix constructed using predeq.est. Here, the standard kernel extrapolation is used (see help(ksmooth) is S-Plus). |
Returns:
lcov | The vector (of length req.length) of the local autocovariances at the end of the series. |
extrapolated | The extrapolated autocovariance (see above). |