predictperYW {perARMA} | R Documentation |
Prediction for PAR model
Description
Procedure predictperYW
provideds the LMS forecast
of a PAR(p) series. The Yule-Walker method is first use to
estimate the LMS prediction coefficients using all the
observed data in x
.
Additionally, procedure predseries
plots the predicted values of the series with real future
values of the series (provided that such real data is
available).
Usage
predictperYW(x, T_t, p, missval, start,...)
predseries(real, x, T_t, p, start,...)
Arguments
x |
input time series. |
T_t |
period of PC-T structure. |
p |
order of autoregression, it is assumed constant over time. |
missval |
notation for missing values. |
start |
index of forecast value of the series; there are two possible scenarios: |
real |
the real future values of |
... |
other arguments that will be connected with plot: |
Value
procedure predictperYW
for start<length(x)
plots values of x[start:end]
and xp[start:end]
, where xp
are predicted values; for
start>length(x)
function returns and plots two series:
x |
input series together with predicted values added. |
new |
predicted part of the series only. |
Procedure predseries
plots predicted and real values of the series on the same plot.
Author(s)
Wioletta Wojtowicz
References
Box, G. E. P., Jenkins, G. M., Reinsel, G. (1994), Time Series Analysis, 3rd Ed., Prentice-Hall,
Englewood Cliffs, NJ.
Brockwell, P. J., Davis, R. A. (1991), Time Series: Theory and Methods, 2nd Ed., Springer: New York.
Gladyshev, E. G., (1961), Periodically Correlated Random Sequences, Sov. Math., 2, 385-388.
Examples
data(volumes)
permest_out<-permest(t(volumes),24, 0.05, NaN,'volumes', pp=0)
xd=permest_out$xd
dev.set(which=1)
predictperYW(xd,24,2,NaN,956,end=980)
dev.set(which=1)
predictperYW(xd[1:980],24,2,NaN,1004)
data(volumes.sep)
dev.set(which=1)
realdata=c(volumes,volumes.sep)
predseries(realdata,t(volumes[1:980]),24,2,1004)