* * Example of ARDL model starting page 251 * open data inflation.dat calendar(m) 1983:12 data(format=free,org=columns) 1983:12 2006:05 year month wage pcwage cpi infln * set y = 100*(log(cpi)-log(cpi{1})) set x = 100*(log(wage)-log(wage{1})) * linreg y # constant x{0 to 3} y{1 2} @regcorrs(number=24) * * This is a bit more advanced. It uses the function %polydiv, which divides one * polynomial by another. Since that will, in general, produce an infinite series, * you have to indicate a truncation point - here, that's the 13. * * %EQNLAGPOLY(0,x) takes the last regression and extracts the lag polynomial for * variable x. %EQNLAGPOLY(0,y) does the same thing for the variable y. * compute lagwgts=%polydiv(%eqnlagpoly(0,x),%eqnlagpoly(0,y),13) * * lagwgts is a VECTOR, which isn't the same thing as a SERIES. This copies the * information out so we can use it in a GRAPH. * set dlweights 1 13 = lagwgts(t) graph(footer="Figure 9.9 Distributed lag weights for ARDL model",$ vlabel="Lag weight",hlabel="Lag",number=0) # dlweights