Page 4 of 5

Re: Bayesian VAR

Posted: Thu May 24, 2012 11:57 am
by EViews Esther
The Ko-Ko prior requires the OLS estimates in its calculation, however, this calculation could not be done due to the singularity problem.

One possible solution for your project is to obtain a longer period of sample (Currently, the given sample size is 21).

Re: Bayesian VAR

Posted: Mon Aug 06, 2012 6:52 am
by vanessa14
I have the same problem of near singularity (_sh01 not defined), but I can't expand the sample.. Do you suggest any other way to fix this? Thank you.

Vanessa

Re: Bayesian VAR

Posted: Mon Aug 06, 2012 11:33 am
by EViews Esther
Unfortunately, the current BVAR algorithm cannot solve the singularity problem. However, I will put it on my list.

Re: Bayesian VAR

Posted: Tue Aug 14, 2012 4:32 pm
by vanessa14
Hi, just to give a feed-back to you guys, I kind of solved my problem. Turns out the message "_sh1 is not defined" wasn't because of singularity, but because of bad conditioning of the matrix, and I fixed it by changing the scale of the dependent variable, from millions to billions. It worked for me! it's worth to try.

Vanessa

Re: Bayesian VAR

Posted: Wed Oct 03, 2012 11:58 am
by sfrable
I am receiving the same problem with "_sh1 is not defined."

How big does the sample size have to be in order to not have near singularity?

Re: Bayesian VAR

Posted: Fri May 10, 2013 5:50 am
by yoz2k3
Hi Gareth, Esther,

Thanks for this add-in, it is really useful and the interface is friendly and does pretty much all the work. I have some questions though:
1) is there any chance to get into this add-in the possibility to create the std error bands for the IRFs graph?
2) is there any chance to get variance decomposition graphs as well?
3) regarding the IRFs, can you help me understand what is the impulse size, sign and if we would be able to change it? (I assume, by altering the "impulse.prg" file. In the add-in documentation there was nothing referring to the IRFs)

Thanks a lot.

Re: Bayesian VAR

Posted: Thu Jul 25, 2013 12:36 am
by sean123
Hi,

If I'd like to use the Sims-Zha Normal-Wishart prior, but change the prior expectation of the AR(1) coefficients to 0 instead of 1, where would I make this change? I can't really seem to figure out where it is exactly... Thanks in advance!

Re: Bayesian VAR

Posted: Mon Jul 29, 2013 4:59 am
by sean123
I found it! In the szmodel.prg file,

Code: Select all

{%temp1} = @transpose({%X})*{%Y}+{%temp1}
should simply be changed to

Code: Select all

{%temp1} = @transpose({%X})*{%Y}
and, correspondingly, for the covariance matrix

Code: Select all

matrix {%St} = ({%S0} + @inner({%Y},{%Y}) + {%temp} - @transpose({%Bh})*{%hstar1}*{%Bh} )
should be changed to

Code: Select all

matrix {%St} = ({%S0} + @inner({%Y},{%Y}) - @transpose({%Bh})*{%hstar1}*{%Bh} )

Re: Bayesian VAR

Posted: Fri Aug 02, 2013 7:37 am
by sean123
Another question: Why is the prior degrees of freedom (v) equal to the number of endogenous variables (m) plus 1? In "Numerical Methods for Estimation and Inference in Bayesian VAR-models" (1997) by Kadiyala & Karlsson the number of df is defined to be v>m+1, not v>=m+1. I know your reference is Brandt & Freeman (2006), but I can't find it in there. They say that "v>0" which doesn't make much sense either...

Re: Bayesian VAR

Posted: Fri Aug 02, 2013 10:07 am
by EViews Esther
the number of df is defined to be v>m+1, not v>=m+1. I know your reference is Brandt & Freeman (2006), but I can't find it in there. They say that "v>0" which doesn't make much sense either...
The Inverse-Wishart (or Wishart) distribution has finite expectations and can be invertible only when v > m-1. Therefore, many Bayesian economists set the degree of freedom as m+1.

Please note that while Kadyiala and Karlsson (1997) provided the genaralizations of the natural conjugate Normal-Wishart prior (required E(beta) = beta_hat and V(beta) = (v-m-1)^(-1)(Sigma_hat kron Omega_hat) where v > m +1), Sims-Zha (1998) showed how the dummy observations can be helpful to choose the priors.

Re: Bayesian VAR

Posted: Mon Aug 05, 2013 3:48 am
by sean123
the number of df is defined to be v>m+1, not v>=m+1. I know your reference is Brandt & Freeman (2006), but I can't find it in there. They say that "v>0" which doesn't make much sense either...
The Inverse-Wishart (or Wishart) distribution has finite expectations and can be invertible only when v > m-1. Therefore, many Bayesian economists set the degree of freedom as m+1.

Please note that while Kadyiala and Karlsson (1997) provided the genaralizations of the natural conjugate Normal-Wishart prior (required E(beta) = beta_hat and V(beta) = (v-m-1)^(-1)(Sigma_hat kron Omega_hat) where v > m +1), Sims-Zha (1998) showed how the dummy observations can be helpful to choose the priors.
I see. Thanks for your reply, I think I get it now! (Also, I don't currently make use of the dummy observations, so as far as I can tell the prior I'm working with is essentially the 'standard' Normal-Wishart prior, only with the construction of the prior covariance matrices as laid out in Sims & Zha (1998)).

Re: Bayesian VAR

Posted: Wed Aug 07, 2013 3:02 am
by sean123
Just to have this confirmed: the impulse responses are not accumulated, correct?

Re: Bayesian VAR

Posted: Wed Aug 07, 2013 6:44 am
by EViews Gareth
Correct.

Re: Bayesian VAR

Posted: Tue Sep 03, 2013 5:58 am
by noxifero
Hello everybody,

I was wondering whether there is a way to select the method by which the initial residual covariance is estimated (e.g. on the full VAR or equation by equation, i.e. univariate) or at least whether there's a way to know which is the default methodology, in case it could not be changed.

Thanks very much in advance.

Andrea

Forecasting with Models created by B-VAR

Posted: Fri Nov 29, 2013 12:42 pm
by rsabbadini
First of all, thank you for this Add-In.

I am using it to estimate and forecast B-VAR with EXOGENOUS variables under the SZ prior. The B-VAR is estimated correctly and I request a model to be created. I was obtaining really weird forecast. Then I saw the problem. Even if I estimate a B-VAR without exogenous variables it includes a constant term. That is fine. But when I include one exogenous variable, for example @trend(), in the model created (look at the Source Text) the coefficient associated with the constant in fact multiplies the exogenous variable.
In any equation of the B-VAR, in the Spool, the constant appears as the last variable, after both endogenous and exogenous variable. But in the model it appears after the endogenous variable and before the exogenous ones. So exogenous variable multiply the wrong coefficients, they are in an incorrect order.
That is the reason I need your help.

Beyond that I would like to know if in the B-VAR Add-In it is possible to use the logarithmic transformation of the variables, log(x) for example, as it is in the regular VAR command. Since I am estimating the model in logarithmic but I want to forecast the untransformed variable, this would be helpful.

Thank you!