Grocer Function
NAME
irf - Calculates Impulse Response Function for VAR
CALLING SEQUENCE
res=irf(results,S,arg1,..,argn)
PARAMETERS
Input
-
results = results tlist returned by VAR
-
S = scalar for number of periods in IRF
-
argi = optional argument which can be:
- 'mres=x' where:
x = chol1 (cholesky decomposition)
x = chol2 (triangular factorisation)
x = original (original residuals)
(default = chol1)
- 'meth=x' where:
x = asym (asymptotic formula)
x = mc1 (Monte-Carlo simulations using draws from the coefficients)
(default = asym)
- 'niter=x' where x= # iterations for the Monte-Carlo simulations (if any; default=1000)
- 'size=x' where x = significance level for the confidence band (default =0.05)
Output
-
res = a results tlist with:
- res('meth') = 'irf'
- res('mres') = decomposition method
- res('T') = # of periods represented
- res('IRF') = ((S+1) x T) impulse response functions
- res('IRF_LOW') = ((S+1) x T) lower range of impulse response confidence band
- res('IRF_UPP') = ((S+1) x T) upper range of impulse response confidence band
- res('PHI') = (N*p x T) matrix of coefficients
- res('resvar') = results tlist of the originating VAR
- res('msg') = message inidicating the nature of the decomposition
- res('size') = size of the confidence band
DESCRIPTION
Calculates Impulse Response Function for VAR.
EXAMPLE
1) results=var(2,'endo=del(log(rfa_inv)),del(log(rfa_inc)),del(log(rfa_cons))'); [resirf]=irf(results,10,'mres=chol1','meth=asym')
2) [resirf]=irf(results,10,'mres=original','meth=mc1','niter=1000')
Examples taken from function var_d(). In the first one, impulse response is calculated for 10 periods, with shocks calculated from a
Choleski decomposition, with the asymptotic formula. In the second one, impulse response is calulated for 10 periods, with original
unorthogonalized shocks, using 1000 draws from the coefficients estimated law.
AUTHOR
Eric Dubois 2002