Skip to content
Prev 7104 / 15274 Next

Forcasting VAR/VEC

I tied to post it through Nabble, however it perhaps failed........ Here is my query. Your help will be highly appreciated.

I found a direct problem while implementing predict method. To use that, I need to give values for argument "object": 

object: An object of class ??varest??; generated by ?VAR()?, or an 
          object of class ??vec2var??; generated by ?vec2var()?. 

Here what I have I the estimated coefficients and last few values (required for prediction). Given those, how can I construct object of that class? 

For example, I have VAR[2] model with estimated coefficients: 

A1 <- t(matrix(c(-0.9444135,  0.5289205,  1.54338344, -1.2059849,  0.08658383, -0.7626375, 0.5384060,  1.34211012, -0.1540462,  0.07684465, 
-1.5000912,  0.5975748,  2.08629175, -1.3629879,  0.16405863,  0.5622497, -0.5749668, -0.01207330,  1.6547463, -0.37280903, -1.1190102, 
0.4834678,  1.04152221, -0.5084529,  0.91748918), 5)) 

A2 <- t(matrix(c(-0.5281084,  0.6750694, -0.00700632,  0.5744008, -0.540538174, -0.5115759,  0.6663074, -0.03690401,  0.1015040, 
-0.483984397, -0.6669159,  0.7810531, -0.08478713,  0.2837110, -0.634807434,  0.2474859, -0.2126529,  -0.04611398, -0.2851814, -0.003198122, 
0.1136257, -0.4070806, -0.15362813,  0.1043871, -0.570401589), 5)) 

## and deterministic terms with monthly seasonal dummy (11 dummy variables + constant): 

Mu <- t(matrix(c(0.01971314683, 7.392074e-05, 0.06745512042, 0.03066764063, -0.05716243051, -0.01666261294, -0.02648375478, -0.07739940822, 
-0.08537205872, -0.03454705454, 0.01026347102, 3.93408495893, 0.01124435027, 0.00826573416, 0.07232184812, 0.02643898799, -0.02290620244, 
0.00631679187, -0.02120713774, -0.06034222549, -0.06737971493, -0.02466344307, 0.01574220616, 3.67816873865, 0.01817359276, 0.00511780538, 
0.06717006338, 0.06206760303, -0.04353428003, -0.03033956305, -0.00535023233, -0.06992876937, -0.10020345332, -0.04323120694, 0.00399287988, 
3.01849213684,-0.00696500762, 0.00784220761, 0.00337317617, -0.00771413903, 0.03016416594, 0.02404299199, 0.00752992866, 0.01211247641, 
0.01442465011, 0.00162618787, 0.00646325736, 0.18377741575,0.06172376263, 0.03093119587, 0.00519357485, -0.00720735363, -0.02268228948, 
-0.03428031321, 0.01599783772, -0.01470977952, -0.00498472297, -0.03734476303, -0.03712904004, 2.95905626288), ncol=5)) 

## and last 4 values of TS 

YY <- t(matrix(c(-0.55367226, 3.276980, -0.57634682, 3.827854, 4.248918, -0.57806007, 3.254492, -0.61281320, 3.835869, 4.280090, -0.51697066, 
3.300236, -0.55756556, 3.815981, 4.274613, -0.47619582, 3.320164, -0.48689008, 3.793915, 4.216955), 5)) 

Given those information, how I can predict values for next 2 steps? 

Thanks,
--- On Mon, 12/13/10, Pfaff, Bernhard Dr. <Bernhard_Pfaff at fra.invesco.com> wrote: