I am trying to use the long run identification strategy as in Stock and Watson (2005) and Lastrapes (Economic Letters 2005) , "Estimating and identifying vector autoregressions under diagonality and block exogeneity restrictions"
I am trying to look at the impact of money supply shocks on food price in India. I have a vector z_t = [z1_t, z2_t].
Now the first z1_t is basically how food price depends on its own lags and lags of all macro variables. z2_t is a vector of macro variables, how macro variables depend only on its own lags and not lags of food price.(block exogeniety)
z2_t has all the macro variables (GDP, INTEREST RATE, REAL MONEY NOMINAL MONEY). I have used the long run identifying restriction on the macro sub system.
I have done a cholesky decomposition of the D(1) matrix and got the IRF's of the macro variables to money supply shock. But I have to find out the IRF's of food prices to money supply shocks. I have done SUR on my first equation z1_t and
an unrestricted VAR for second vector of macro variables z2_t. I do not know how to link up the two, because I need to apply the long run identification strategy from the z2 sub system to z1
I need to find out the variance co variance matrix of z_t. Could you please help me. I have run the following code.
Code: Select all
*
CALENDAR(q) 1981:1
open data lkdata1.xls
data(format=xls,org=cols) 1981:1 2013:4 FA GDP INR CPI NMS
*
set rgdp = (gdp/cpi)*100
set grrgdp = log(rgdp/rgdp{1})*100
set rms = (nms/cpi)*100
set grrms = log(rms/rms{1})*100
set grnms = log(nms/nms{1})*100
set inflation = ((cpi-cpi{1})/cpi{1})*100
set lnrgdp = log(rgdp)
set lnrms = log(rms)
set lnnms = log(nms)
diff lnrgdp / dlnrgdp
diff lnrms / dlnrms
diff lnnms / dlnnms
diff fa / dfa
statistics(noprint) dlnrgdp 1981:2 1991:4; compute dlnrgdp_mean1 = %mean
statistics(noprint) dlnrgdp 1992:1 2013:4; compute dlnrgdp_mean2 = %mean
set dlnrgdp_dm 1981:2 1991:4 = dlnrgdp - dlnrgdp_mean1
set dlnrgdp_dm 1992:1 2013:4 = dlnrgdp - dlnrgdp_mean2
statistics(noprint) dlnrms 1981:2 1991:4; compute dlnrms_mean1 = %mean
statistics(noprint) dlnrms 1992:1 2013:4; compute dlnrms_mean2 = %mean
set dlnrms_dm 1981:2 1991:4 = dlnrms - dlnrms_mean1
set dlnrms_dm 1992:1 2013:4 = dlnrms - dlnrms_mean2
statistics(noprint) dlnnms 1981:2 1991:4; compute dlnnms_mean1 = %mean
statistics(noprint) dlnnms 1992:1 2013:4; compute dlnnms_mean2 = %mean
set dlnnms_dm 1981:2 1991:4 = dlnnms - dlnnms_mean1
set dlnnms_dm 1992:1 2013:4 = dlnnms - dlnnms_mean2
compute p = 4, ksteps = 50, nvar = 4
declare vector[series] depvar(4)
labels depvar(1) depvar(2) depvar(3) depvar(4)
# 'GDP' 'Interest Rate' 'Real Money' 'Nominal Money'
smpl 1981:2 2013:4
inquire(smpl) nbeg nend
set depvar(1) 1981:2 nend = dlnrgdp_dm
set depvar(2) 1981:2 nend = inr
set depvar(3) 1981:2 nend = dlnrms_dm
set depvar(4) 1981:2 nend = dlnnms_dm
* VAR estimation
system(model=var)
variables depvar
lags 1 to p
det constant trend
end(system)
estimate(model=var,cvout=sigma,residuals=res_vector,coeffs=B)
*Identification from the macro subsystem
compute C22_1 = inv(%varlagsums)
compute H = C22_1*sigma*tr(C22_1)
compute D22_1 = %decomp(H)
compute D22_0 = inv(C22_1)*D22_1
impulses(model=var,result=impulses,decomp=D22_0,steps=ksteps)
display D22_1
compute implabel = || "GDP","Interest Rate","Real Money","Nominal Money" ||
@varirf(model=var,steps=ksteps,varlabels=implabel,page=byshocks)
linreg(define=equationz1) dfa
# dfa{1 to p} depvar(1){1 to p} $
depvar(2){1 to p} $
depvar(3){1 to p} depvar(4){1 to p}
sur(outsigma=v) 1
# equationz1