0

After running a VAR with 9 variables, I'm simply trying to obtain my impulse response functions through the irf() function.

However, I need to select the size of the shock as well its sign.

I know that this function from the VARS package uses by default a one standard error shock.

I'm also aware that I can simply multiply my IRFs by the size of the shock that I want.

Nevertheless, confidence bands obtained with bootstrapping cannot simply be multiplied by the desired value.

Therefore, how can I select the size of the shock and its sign, while computing the confidence bands through bootstrapping in my IRFs?

Thanks

library(vars)
vdewshi=VAR(dewshi, p=1, type = ('const')) 

irfdewshi=irf(vdewshi, n.ahead = 10, ci=0.68, runs=1000, cumulative=TRUE) 

plot(irfde$irf$factor1de[,1], type ='l',lwd=2,ylab= "", xlab="Steps", ylim=range(irfde$Lower$factor1de[,1],irfde$Upper$factor1de[,1]), main='Short-Term Rate')
lines(irfde$Upper$factor1de[,1], lty=2, col="red")
lines(irfde$Lower$factor1de[,1], lty=2, col="red")
StupidWolf
  • 45,075
  • 17
  • 40
  • 72
jc1998
  • 1
  • 1
  • 1
    Hi jc1998, welcome to Stack Overflow. Unfortunately, it will be extremely challenging to answer your question without the code you've tried thus far and at least a sample of your data. Please [edit](https://stackoverflow.com/posts/65026731/edit) your question with the code and the output of `dput(data)` or `dput(head(data))` if your data is very large. Replace `data` with the name of your actual data. See [How to make a great R reproducible example](https://stackoverflow.com/a/5963610/) for more. – Ian Campbell Nov 26 '20 at 17:38
  • The solution is here: https://datascience.stackexchange.com/a/11009/120393 – Sav-econ Jul 08 '21 at 20:14

0 Answers0