by Gilbril » Sun Apr 15, 2012 11:54 am
Dear Tom,
I have now written a procedure which is based on the %POLYDIV function. As a first step, I have carried out a transfomation into levels before using the function. However, if I calculate the long-run multiplier, they do not converge towards the long-run values but to zero which is somewhat puzzling. I am unsure whether this is due to a mistake in the procedure (Which I think should be correct). Any help would be greatly appreciated.
I have attached the whole procedure and the data. However, the main part is the following
***Choose optimal NARDL Model
set y = ih_1_0
set dy = y-y{1}
*j is the lag-lentg of DY, determined before
compute j = 1
*k j is the lag-lentg of DEONIA_PL und DEONIA_MIN, determined before,
compute k = 0
linreg(define=NARDL) dy 2003:01 2011:11
# constant y{1} eonia_pl{1} eonia_min{1} dy{1 to j} deonia_pl{0 to k} deonia_min{0 to k}
***Calculating Lagpolynom
*Calculating coefficients in Level
compute y_1 = %beta(2)+%beta(5)+1
dis "Y(t-1)" y_1
compute y_2 = %beta(5)*(-1)
dis "Y(t-2)" y_2
compute pl = %beta(6)
dis "EONIA_PL(t)" pl
compute pl_1 = %beta(3)+%beta(6)*(-1)
dis "EONIA_PL(t-1)" pl_1
compute min = %beta(7)
dis "EONIA_MIN(t)" min
compute min_1 = %beta(4)+%beta(7)*(-1)
dis "EONIA_PL(t-1)" min_1
*Create Equation
equation(coeffs=||y_1,y_2,pl,pl_1,min,min_1||) yeq y
# y{1} y{2} eonia_pl eonia_pl{1} eonia_min eonia_min{1}
*Extracting Lagpolynoms
compute poly_y = %eqnlagpoly(yeq,y)
dis "Y-Polynom" poly_y
compute poly_pl = %eqnlagpoly(yeq,eonia_pl)
dis "EONIA_PL-Polynom" poly_pl
compute poly_min = %eqnlagpoly(yeq,eonia_min)
dis "EONIA_MIN-Polynom" poly_min
*Division of EONIA_PL- und EONIA_MIN-Polynom by Y-Polynom
compute pl_inv = %polydiv(poly_pl,poly_y,13)
dis "durch Y_inv dividiertes EONIA_PL-Polynom" pl_inv
compute min_inv = %polydiv(poly_min,poly_y,13)
dis "durch Y_inv dividiertes EONIA_MIN-Polynom" min_inv
*Direct new coefficients
equation(coeffs=||pl_inv(1),pl_inv(2), pl_inv(3), pl_inv(4), pl_inv(5), pl_inv(6),pl_inv(7),pl_inv(8),pl_inv(9),pl_inv(10),pl_inv(11),pl_inv(12),pl_inv(13),pl_inv(14), $
min_inv(1),min_inv(2),min_inv(3),min_inv(4),min_inv(5),min_inv(6),min_inv(7),min_inv(8),min_inv(9),min_inv(10), min_inv(11), min_inv(12),min_inv(13),min_inv(14)||) shockeqn y
# eonia_pl{0 to 13} eonia_min{0 to 13}
*Impuls-Response
equation(empty) dummyeqn eonia_pl
group nardlmodel shockeqn dummyeqn
impulse(model=nardlmodel,shocks=||0.0,1.0||,results=responses,steps=36)
Thanks and Regards
Gilbril
- Attachments
-
Code.PRG
- (6.3 KiB) Downloaded 51 times
-
Data.xls
- (63.5 KiB) Downloaded 45 times