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, impuls=NULL, v, plot=TRUE)

Arguments

y a univariate time series or A multivariate time series.
r one step ahead prediction starting position R.
s long range forecast starting position S.
h maximum span of long range forecast H.
arcoef AR coefficient matrices.
macoef MA coefficient matrices.
impuls impulse response matrices.
v inovation variance.
plot logical. If TRUE (default) the real data and predicted values are plotted.

Details

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

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 p is AR order and q is MA order.

Value

predct predicted values : predct(i) (r<=i<=s+h).
ys predct(i) - y(i) (r<=i<=n).
pstd predct(i) + (standard deviation) (s<=i<=s+h).
p2std predct(i) + 2*(standard deviation) (s<=i<=s+h).
p3std predct(i) + 3*(standard deviation) (s<=i<=s+h).
mstd predct(i) - (standard deviation) (s<=i<=s+h).
m2std predct(i) - 2*(standard deviation) (s<=i<=s+h).
m3std predct(i) - 3*(standard deviation) (s<=i<=s+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".
  yy <- arima.sim(list(order=c(2,0,1), ar = c(0.64,-0.8), ma=c(-0.5)), n=350)
  y1 <- yy[51:300]
  z <- autoarmafit(y1)
  ar <- z$model[[1]]$arcoef
  ma <- z$model[[1]]$macoef
  v <- z$model[[1]]$v
  y2 <- yy[301:350]
  prdctr(y2, r=30, s=50, h=10, arcoef=ar, macoef=ma, v=v)

[Package timsac version 1.2.1 Index]