prdctr {timsac}R Documentation

Prediction Program

Description

Operate on a real record of a vector process and compute predicted values.

Usage

prdctr(y, r, s, h, arcoef, macoef = NULL, impulse = NULL, v, plot = TRUE)

Arguments

y

a univariate time series or a multivariate time series.

r

one step ahead prediction starting position RR.

s

long range forecast starting position SS.

h

maximum span of long range forecast HH.

arcoef

AR coefficient matrices.

macoef

MA coefficient matrices.

impulse

impulse response matrices.

v

innovation variance.

plot

logical. If TRUE (default), the real data and predicted values are plotted.

Details

One step ahead Prediction starts at time RR and ends at time SS. Prediction is continued without new observations until time S+HS+H. Basic model is the autoregressive moving average model of y(t)y(t) which is given by

y(t)A(t)y(t1)...A(p)y(tp)=u(t)B(1)u(t1)...B(q)u(tq),y(t) - A(t)y(t-1) -...- A(p)y(t-p) = u(t) - B(1)u(t-1) -...- B(q)u(t-q),

where pp is AR order and qq is MA order.

Value

predct

predicted values : predct[i] (ri\le i \les++h).

ys

predct[i] - y[i] (rin\le i \le n).

pstd

predct[i] + (standard deviation) (si\le i \les++h).

p2std

predct[i] + 2*(standard deviation) (si\le i \les++h).

p3std

predct[i] + 3*(standard deviation) (si\le i \les++h).

mstd

predct[i] - (standard deviation) (si\le i \les++h).

m2std

predct[i] - 2*(standard deviation) (si\le i \les++h).

m3std

predct[i] - 3*(standard deviation) (si\le i \les++h).

References

H.Akaike, E.Arahata and T.Ozaki (1975) Computer Science Monograph, No.6, Timsac74, A Time Series Analysis and Control Program Package (2). The Institute of Statistical Mathematics.

Examples

# "arima.sim" is a function in "stats".
# Note that the sign of MA coefficient is opposite from that in "timsac".
y <- arima.sim(list(order=c(2,0,1), ar=c(0.64,-0.8), ma=c(-0.5)), n = 1000)
y1 <- y[1:900]
z <- autoarmafit(y1)
ar <- z$model[[1]]$arcoef
ma <- z$model[[1]]$macoef
var <- z$model[[1]]$v
y2 <- y[901:990]
prdctr(y2, r = 50, s = 90, h = 10, arcoef = ar, macoef = ma, v = var)

[Package timsac version 1.3.8-4 Index]