<< Hetero_TVP_VAR1 VAR estimations Hetero_TVP_VAR_stdresid >>

Grocer >> VAR estimations > Hetero_TVP_VAR_irf

Hetero_TVP_VAR_irf

IRF for a Time varying structural VAR

CALLING SEQUENCE

[irf_med,irf_mean,irf_low,irf_up]=Hetero_TVP_VAR_irf(r,dates,nhor,pvalue,impulse_mode,plt)

PARAMETERS

Input

* res = a tlist results from a Homo_TVOP_VAr estimation

* dates = a string vector (standard Grocer dates) or a real vector (corresponding to the indexes of the observations)

* nhor = the horizon for the IRF

* pvalue = the p-value of the confidence band

* impulse_mode = the mode used to calculate the impulse response (optional):

  - 'unitary' for unitary shocks (default)     

  - 'std_dev' for 1 standard deviation shock calcualted at each date t

  - 'av std' for 1 standard deviation shock averaged over the whole estimation period

* plt = the way irfs will be graphed (optional):

  - 'noplt' if the user does not want to plot the IRF

  - 'isolated' if the user wants to graph the irfs separately at each period (and with their confidence bands)

  - 'together' if the user wants to graph on the same graph the irfs at the different periods (without their confidence bands)

  - 'all' if the user wants to graph according to both options 'isolated' and 'together' (default)

 

Output

* irf_med = a (ndates x nendo x nendo x (nhor+1)) hypermatrix, collecting all median IRF

* irf_mean = a (ndates x nendo x nendo x (nhor+1)) hypermatrix, collecting all average IRF

* irf_low = a (ndates x nendo x nendo x (nhor+1)) hypermatrix, collecting all lower band IRF

* irf_up = a (ndates x nendo x nendo x (nhor+1)) hypermatrix, collecting all upper band IRF

DESCRIPTION

Performs the impulse response function for a Time varying structural VAR with heteroskedastic covariance matrix.

EXAMPLE

stacksize('max')
load(GROCERDIR+'\data\primiceri.dat')
mkdir(GROCERDIR+'\temp')
nlag=2
bounds('1953q3','1963q2')
prior=tvpvar_prior0(nlag,4,4,0.01,0.01,0.1,['Inflation';'Unemployment';'rate_3m'])


bounds('1963q3','2001q3')
res=Hetero_TVP_VAR(nlag,['Inflation';'Unemployment';'rate_3m'],10000,2000,prior,path,2000)


[irf_med,irf_mean,irf_low,irf_up]=Hetero_TVP_VAR_irf(res,['1975q1';'1981q3';'1996q1'],20,0.32)
// After having estimated Primiceri (2005) tvp-VAR, the irfs are calculated at dates
// '1975q1', '1981q3' and '1996q1', with a 20 periods horizon and a 68% confidence band

AUTHOR

Éric Dubois 2015

Report an issue
<< Hetero_TVP_VAR1 VAR estimations Hetero_TVP_VAR_stdresid >>