FK83 / bvarsv

Analysis of the Primiceri (REStud, 2005) model
28 stars 14 forks source link

Out of sample forecasting #4

Closed AEdlerfi closed 6 years ago

AEdlerfi commented 6 years ago

Suppose I want to use this model to generate out of sample point forecasts and confidence intervals, like in the VARS package. Is there a way this can be easily achieved? Is it simply taking the mean and +/- 95% quantiles from the fc.ydraws array?

FK83 commented 6 years ago

Yes, you can simply take the quantiles of the fc.ydraws array. The function predictive.draws helps to select the correct elements of the array (corresponding to the variable and forecast horizon you're interested in).

AEdlerfi commented 6 years ago

Thanks Fabian! And thanks for the neat package. Another question - the sample I am using has 110 observations, yet the beta.postmean array has a time dimension of 68. I notice something similar with the USmacro example you give. My guess is this array doesn't include the OLS VAR estimates used to form the priors? But would be great if you could confirm.

Thanks again for all your work on this, it is great!

FK83 commented 6 years ago

Glad you like the package! The time dimension of beta.postmean is 110 minus tau observations for the priors (default is tau = 40), minus p observations for initialization (default is p = 1).