msvar irf with confidence bands
resirfcb=msvar_irf_cb(res,hor,niter,siz,arg1,...,argn)
* res = a tlist result from a ms var estimation
* hor = a scalar, the horizon of the irf (note that the shocks are supposed to happen at time 0; therefore (hor+1) impulses are calculated)
* niter = number of iterations
* siz = siz of confidence bands
* mres = optional argument that can be:
- x = chol1 (cholesky decomposition)
- x = chol2 (triangular factorisation)
- x = original (original residuals)
- x = soriginal (standardized (one standard deviation shock) uncorrelated residuals)
- x = girf (Generalized Impulse Response based on Pesaran and Shin) (default = soriginal)
* resirf = a result tlist with:
- resirf('meth') = 'msvar cb irf'
- resirf('msvar cb res') = the input ms var results tlist
- resirf('# irf') = the horizon of the irf calculations
- resirf('nb states') = the # of states
- resirf('nb irf') = the # of different AR parts
. 1 if they do not switch
. the # states if they switcch
- resirf('sigma switch') = the # of switching wariances
. 1 if they do not switch
. the # states if they switch
- resirf('irf part state') = the partial impulse response
- resirf('irf full state') = the full impulse response
- resirf('irf part lower cb') = the lower part of the confidence band for the partial impulse response
- resirf('irf full lower cb') = the lower part of the confidence band for the full impulse response
- resirf('irf part upper cb') = the upper part of the confidence band for the partial impulse response
- resirf('irf full upper cb') = the upper part of the confidence band for the full imptulse response
- resirf('irf part median') = the median part of the confidence band for the partial impulse response
- resirf('irf full median') = the median part of the confidence band for the full impulse response
- resirf('irf part state # i') = partial impulse response for state i
- resirf('irf full state # i') = the full impulse response for state i
- resirf('irf part lower cb state # i') = lower part of the confidence band for partial impulse response of state i
- resirf('irf part upper cb state # i') = upper part of the confidence band for partial impulse response of state i
- resirf('irf part median state # i') = median partial impulse response of state i
- resirf('irf full lower cb state # i') = lower part of the confidence band for full impulse response of state i
- resirf('irf full upper cb state # i') = upper part of the confidence band for full impulse response of state i
- resirf('irf full median state # i') = median full impulse response of state i
global GROCERDIR ; load(GROCERDIR+'\data\msirf_d.dat') rms=ms_var('all',2,['100*delts(log(us_gdp))','us_un'],2,2,3) rirf_cb=irf_cb(rms,20,99,0.1) // example taken from function msvar_irf_d: provides irf confidence bands for the msvar // estimate stored in tlist rms, at a 20 periods (quarters ) horizon, with 99 draws | ![]() | ![]() |