VARpred: VAR Prediction

Description Usage Arguments Details Value Author(s) References Examples

Description

Computes the forecasts of a VAR model, the associated standard errors of forecasts and the mean squared errors of forecasts

Usage

1
VARpred(model, h = 1, orig = 0, Out.level = F)

Arguments

model

An output object of a VAR or refVAR command

h

Forecast horizon, a positive integer

orig

Forecast origin. Default is zero meaning the forecast origin is the last data point

Out.level

A logical switch to control output

Details

Computes point forecasts and the associated variances of forecast errors

Value

pred

Point predictions

se.err

Standard errors of the predictions

mse

Mean-square errors of the predictions

Author(s)

Ruey S. Tsay

References

Tsay (2014, Chapter 2). Multivariate Time Series Analysis with R and Financial Applications. John Wiley. Hoboken, NJ.

Examples

1
2
3
4
5
data("mts-examples",package="MTS")
gdp=log(qgdp[,3:5])
zt=diffM(gdp)
m1=VAR(zt,p=2)
VARpred(m1,4)

Example output

Constant term: 
Estimates:  0.001258163 0.001231581 0.002895581 
Std.Error:  0.0007266338 0.0007382941 0.000816888 
AR coefficient matrix 
AR( 1 )-matrix 
      [,1]  [,2]   [,3]
[1,] 0.393 0.103 0.0521
[2,] 0.351 0.338 0.4691
[3,] 0.491 0.240 0.2356
standard error 
       [,1]   [,2]   [,3]
[1,] 0.0934 0.0984 0.0911
[2,] 0.0949 0.1000 0.0926
[3,] 0.1050 0.1106 0.1024
AR( 2 )-matrix 
        [,1]   [,2]     [,3]
[1,]  0.0566  0.106  0.01889
[2,] -0.1914 -0.175 -0.00868
[3,] -0.3120 -0.131  0.08531
standard error 
       [,1]   [,2]   [,3]
[1,] 0.0924 0.0876 0.0938
[2,] 0.0939 0.0890 0.0953
[3,] 0.1038 0.0984 0.1055
  
Residuals cov-mtx: 
             [,1]         [,2]         [,3]
[1,] 2.824442e-05 2.654091e-06 7.435286e-06
[2,] 2.654091e-06 2.915817e-05 1.394879e-05
[3,] 7.435286e-06 1.394879e-05 3.569657e-05
  
det(SSE) =  2.258974e-14 
AIC =  -31.13328 
BIC =  -30.726 
HQ  =  -30.96783 
orig  125 
Forecasts at origin:  125 
           uk        ca       us
[1,] 0.003129 0.0005166 0.001660
[2,] 0.002647 0.0031687 0.004889
[3,] 0.003143 0.0048231 0.005205
[4,] 0.003839 0.0053053 0.005998
Standard Errors of predictions:  
         [,1]     [,2]     [,3]
[1,] 0.005315 0.005400 0.005975
[2,] 0.005804 0.007165 0.007077
[3,] 0.006202 0.007672 0.007345
[4,] 0.006484 0.007785 0.007442
Root mean square errors of predictions:  
         [,1]     [,2]    [,3]
[1,] 0.005461 0.005549 0.00614
[2,] 0.038967 0.078131 0.06305
[3,] 0.036637 0.045956 0.03329
[4,] 0.031926 0.023140 0.02120

MTS documentation built on May 29, 2017, 5:15 p.m.

Search within the MTS package
Search all R packages, documentation and source code