Constructs the Yule-Walker matrix and the right-hand side of the prediction equations.
Takes:
| uncspec | The uncorrected Haar spectrum of a process. To obtain the spectrum, use uncor.spec. |
| h | Prediction lag. |
| p | Number of rows and columns of the Yule-Walker matrix. |
| smooth | Logical switch: T smooths the local autocovariance before putting in in the matrix, 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. |
| max.lag | The local autocovariances at lags 0, 1, ..., max.lag will be put in the matrix as they have been estimated. For larger lags, they will be set to zero! |
Returns:
| B | The Yule-Walker matrix. |
| RHS | The right-hand side of the prediction equations. |
| extra.var | The extrapolated variance Var(x[t+h]), where uncspec = uncor.spec(x) and t is the length of x. It is required by sig.sq to compute the standard prediction error. |