tenAR.predict | R Documentation |
Prediction based on the tensor autoregressive model or reduced rank MAR(1) model. If rolling = TRUE
, returns the rolling forecasts.
tenAR.predict(object, n.ahead = 1, xx = NULL, rolling = FALSE, n0 = NULL)
object |
a model object returned by |
n.ahead |
prediction horizon. |
xx |
T^{\prime} \times d_1 \times \cdots \times d_K new tensor time series to be used for prediction. Must have at least |
rolling |
TRUE or FALSE, rolling forecast, is FALSE by default. |
n0 |
only if |
a tensor time series of length n.ahead
if rolling = FALSE
;
a tensor time series of length T^{\prime} - n_0 - n.ahead + 1 if rolling = TRUE
.
'predict.ar' or 'predict.arima'
set.seed(333) dim <- c(2,2,2) t = 20 xx <- tenAR.sim(t, dim, R=2, P=1, rho=0.5, cov='iid') est <- tenAR.est(xx, R=1, P=1, method="LSE") pred <- tenAR.predict(est, n.ahead = 1, xx = xx) # rolling forcast n0 = t - min(50,t/2) pred.rolling <- tenAR.predict(est, n.ahead = 5, xx = xx, rolling=TRUE, n0) # prediction for reduced rank MAR(1) model dim <- c(2,2) t = 20 xx <- tenAR.sim(t, dim, R=1, P=1, rho=0.5, cov='iid') est <- matAR.RR.est(xx, method="RRLSE", k1=1, k2=1) pred <- tenAR.predict(est, n.ahead = 1) # rolling forcast n0 = t - min(50,t/2) pred.rolling <- tenAR.predict(est, n.ahead = 5, rolling=TRUE, n0=n0)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.