Bootstrap Code for VAR model
Bootstrap Code for VAR model
Hi Tom,
I am trying to generate my critical values through bootstrap method for a VAR model. using Mehmet Balcilar, Zeynel Abidin Ozdemir, and Yalcin Arslanturk (2010). I do not have enough observations to be able to achieve asymptotic property.
Please can you help with coding for that?
I will appreciate your assistance.
Kind regards,
I am trying to generate my critical values through bootstrap method for a VAR model. using Mehmet Balcilar, Zeynel Abidin Ozdemir, and Yalcin Arslanturk (2010). I do not have enough observations to be able to achieve asymptotic property.
Please can you help with coding for that?
I will appreciate your assistance.
Kind regards,
Re: Bootstrap Code for VAR model
If you are interested in bootstrapping the p-values for a Granger causality test, see https://estima.com/forum/viewtopic.php?f=8&t=2323. It appears that they are actually bootstrapping a Toda-Yamamoto test, which is a bad idea, and, in fact, rather pointless if you're bootstrapping anyway.
Re: Bootstrap Code for VAR model
Hi Tom,
Thanks a great deal for your quick feedback which was helpful. I "tweaked" the code and got good feedback for just 2 variables. However, I have 6 variables and I have tried to edit
the code to accomodate the 6. The code is attached.
The output I get seems wrong with pvalue of 1 and it shows some error messages. Please can you help out with fixing it?
Furthermore, please is there a similar code for Wald test statistics and not just p-values? I will appreciate whatever assistance you can render.
Kind regards,
Thanks a great deal for your quick feedback which was helpful. I "tweaked" the code and got good feedback for just 2 variables. However, I have 6 variables and I have tried to edit
the code to accomodate the 6. The code is attached.
The output I get seems wrong with pvalue of 1 and it shows some error messages. Please can you help out with fixing it?
Furthermore, please is there a similar code for Wald test statistics and not just p-values? I will appreciate whatever assistance you can render.
Kind regards,
- Attachments
-
- T_display.RPF
- (2.34 KiB) Downloaded 1097 times
Re: Bootstrap Code for VAR model
What is it that you are trying to test with the six variable model? It looks like you're trying to test for a triangular set of causality.
Re: Bootstrap Code for VAR model
Hi Tom,
Thanks for the quick feedback.
Not triangular as I don't want to impose any restrictions, at least not for now. I just wish to test for causality amongst them - uni or bi-directional.
Imposition of restrictions I can do for IRFs butnot causality.
Thanks.
Thanks for the quick feedback.
Not triangular as I don't want to impose any restrictions, at least not for now. I just wish to test for causality amongst them - uni or bi-directional.
Imposition of restrictions I can do for IRFs butnot causality.
Thanks.
Re: Bootstrap Code for VAR model
If you're thinking about doing exclusion tests on single variables in a six variable system, you might want to read the discussion at https://estima.com/forum/viewtopic.php?f=4&t=619. Those aren't really very interesting statistically.
Re: Bootstrap Code for VAR model
Thanks Tom. Your responses are always very fast, faster than I expect!
Thanks I had a quick read through. I also went on to another link you recommended on that post - VARCAUSE (Block Exogeneity Test).
Yes I have the model for the VAR as per Toda and Yamamoto but as the program I earlier uploaded show, I don't have enough observations, hence the need
for the bootstrap model to get my critical values as I can't achieve asymptotic property. It is further compounded by the fact I am using a rolling window.
Please do you suggest the VARCAUSE as uploaded by ALberto in "Block Exogeneity Test" will suffice as I noticed there seems to be some overlap as Alberto seemed to have "tweaked" the VARCAUSE to help with what the fellow who started the conversation wanted?
From what Alberto mentioned they seem to be pretty much the same though in the post you highlighted the they are testing for endo and exo genous variables.
On the other hand, in the post you earlier recommended (Multivariate Granger Causality), Appollon suggested these:
system(model=unrestricted)
variables loggdp unemp logi
lags 1 to 4
det constant logp{1 to 4} logm2{1 to 4}
end(system)
I would have suggested he adds the 4 lags of loggdp unemp and logi in the "det constant" line and logp and logm in the "Variables" line as I am not interested in restrictions? SO I test for all of the variables on one another at once?
I am sorry just to be clear on what I should drill down on so I don't veer off.
Kind regards,
Thanks I had a quick read through. I also went on to another link you recommended on that post - VARCAUSE (Block Exogeneity Test).
Yes I have the model for the VAR as per Toda and Yamamoto but as the program I earlier uploaded show, I don't have enough observations, hence the need
for the bootstrap model to get my critical values as I can't achieve asymptotic property. It is further compounded by the fact I am using a rolling window.
Please do you suggest the VARCAUSE as uploaded by ALberto in "Block Exogeneity Test" will suffice as I noticed there seems to be some overlap as Alberto seemed to have "tweaked" the VARCAUSE to help with what the fellow who started the conversation wanted?
From what Alberto mentioned they seem to be pretty much the same though in the post you highlighted the they are testing for endo and exo genous variables.
On the other hand, in the post you earlier recommended (Multivariate Granger Causality), Appollon suggested these:
system(model=unrestricted)
variables loggdp unemp logi
lags 1 to 4
det constant logp{1 to 4} logm2{1 to 4}
end(system)
I would have suggested he adds the 4 lags of loggdp unemp and logi in the "det constant" line and logp and logm in the "Variables" line as I am not interested in restrictions? SO I test for all of the variables on one another at once?
I am sorry just to be clear on what I should drill down on so I don't veer off.
Kind regards,
Re: Bootstrap Code for VAR model
You should forget that you ever heard about Toda-Yamamoto. It's just bad statistics. The "point" to it is that it is a test of something (though not really lack of causality) that has standard asymptotics. However, if you're bootstrapping anyway, there is no reason to bootstrap a substandard test rather than a real Granger test.
In order to do a block exogeneity test, you need to figure out what your blocks are.
In order to do a block exogeneity test, you need to figure out what your blocks are.
Re: Bootstrap Code for VAR model
I would be grateful if you could clarify this statement. If I understand it correctly, you are rejecting Toda-Yamamoto. If this is so, given its popularity, could you expand on why you think it's bad?TomDoan wrote:You should forget that you ever heard about Toda-Yamamoto. It's just bad statistics. The "point" to it is that it is a test of something (though not really lack of causality) that has standard asymptotics. However, if you're bootstrapping anyway, there is no reason to bootstrap a substandard test rather than a real Granger test.
In order to do a block exogeneity test, you need to figure out what your blocks are.
Re: Bootstrap Code for VAR model
This is from a RATS discussion list post (of mine) from 2005:terrya wrote:I would be grateful if you could clarify this statement. If I understand it correctly, you are rejecting Toda-Yamamoto. If this is so, given its popularity, could you expand on why you think it's bad?TomDoan wrote:You should forget that you ever heard about Toda-Yamamoto. It's just bad statistics. The "point" to it is that it is a test of something (though not really lack of causality) that has standard asymptotics. However, if you're bootstrapping anyway, there is no reason to bootstrap a substandard test rather than a real Granger test.
In order to do a block exogeneity test, you need to figure out what your blocks are.
In the situation of the original poster, it really makes no sense. The "point" of the TY test is that it has standard asymptotics even if the series have unit roots, while the standard Granger test doesn't. If you're bootstrapping anyway, you don't care about standard asymptotics, so there's no reason not to use the standard exclusion test.We've had several recent questions about the use of the Toda-Yamamoto variant on causality tests (including one user who had a referee insist that he use it). The reference on this is
Toda, H.Y., Yamamoto, T., 1995. Statistical inference in vector autoregression with possibly integrated processes. Journal of Econometrics 66, 225-250.
and, in short, it tests for causality by adding lags to a VAR (to allow for possible unit roots/cointegration) and then tests zero restrictions which don't include those added lags.
Upon taking a careful look at the paper, my reaction was that the result seemed "fishy." I discussed this with a well-known econometrician whose reaction was a bit stronger than that. (I think it's safe to say that he was surprised it ever got published). Despite that fact that there are countless examples of its use in the literature, it is *not* a way around the problem of a non-standard distribution for the causality tests. Rather than fixing the Sims-Stock-Watson problem, it actually confirms their results that most coefficients and linear combinations thereof are asymptotically normal, but that certain restrictions which eliminate channels of influence for unit roots aren't.
By adding extra lags and then not testing them, the bad behavior is shifted onto the untested lags. In effect, you're no longer testing lack of causality, since that requires testing all the lags. While the test statistic has the correct distribution under the null (which the SSW results would predict), it will suffer badly from lack of power since, if the coefficients aren't, in fact, zero, the "causality" will get shifted fairly easily to the untested lag(s) since an integrated process is so highly autocorrelated.
Re: Bootstrap Code for VAR model
Thanks for the clarification.TomDoan wrote:This is from a RATS discussion list post (of mine) from 2005:terrya wrote:I would be grateful if you could clarify this statement. If I understand it correctly, you are rejecting Toda-Yamamoto. If this is so, given its popularity, could you expand on why you think it's bad?TomDoan wrote:You should forget that you ever heard about Toda-Yamamoto. It's just bad statistics. The "point" to it is that it is a test of something (though not really lack of causality) that has standard asymptotics. However, if you're bootstrapping anyway, there is no reason to bootstrap a substandard test rather than a real Granger test.
In order to do a block exogeneity test, you need to figure out what your blocks are.
In the situation of the original poster, it really makes no sense. The "point" of the TY test is that it has standard asymptotics even if the series have unit roots, while the standard Granger test doesn't. If you're bootstrapping anyway, you don't care about standard asymptotics, so there's no reason not to use the standard exclusion test.We've had several recent questions about the use of the Toda-Yamamoto variant on causality tests (including one user who had a referee insist that he use it). The reference on this is
Toda, H.Y., Yamamoto, T., 1995. Statistical inference in vector autoregression with possibly integrated processes. Journal of Econometrics 66, 225-250.
and, in short, it tests for causality by adding lags to a VAR (to allow for possible unit roots/cointegration) and then tests zero restrictions which don't include those added lags.
Upon taking a careful look at the paper, my reaction was that the result seemed "fishy." I discussed this with a well-known econometrician whose reaction was a bit stronger than that. (I think it's safe to say that he was surprised it ever got published). Despite that fact that there are countless examples of its use in the literature, it is *not* a way around the problem of a non-standard distribution for the causality tests. Rather than fixing the Sims-Stock-Watson problem, it actually confirms their results that most coefficients and linear combinations thereof are asymptotically normal, but that certain restrictions which eliminate channels of influence for unit roots aren't.
By adding extra lags and then not testing them, the bad behavior is shifted onto the untested lags. In effect, you're no longer testing lack of causality, since that requires testing all the lags. While the test statistic has the correct distribution under the null (which the SSW
results would predict), it will suffer badly from lack of power since, if the coefficients aren't, in fact, zero, the "causality" will get shifted fairly easily to the untested lag(s) since an integrated process is so highly autocorrelated.