* * Example from page 180, section 6.6 * cal(q) 1993 open data table6-3.prn data(format=prn,org=columns) 1993:1 1998:3 * * y1 = expenditures on services, * y2 = expenditures on durables * y3 = expenditures on non-durables * set logy1 = log(y1) set trend = t linreg logy1 # constant trend * * Graph in log scale * prj fitted scatter # trend fitted * * Graph in levels. Note that, over a five year period with just about a 3% growth * rate, the exponential curve isn't very apparent. 1.03**5 is only slightly * different from 1+.03*5. * set expfit = exp(fitted) scatter # trend expfit * * If you want the slope coefficient to be more easily interpreted as annual * growth, you can change the trend variable so it increases by 1 every year, * rather than every quarter, that is: * set trend = .25*t linreg logy1 # constant trend * * And if you want it to be a percentage, rather than a fraction, you need the * trend series to be .01 x what we just did, which will cause the coefficient to * go UP by a factor of 100. * set trend = .0025*t linreg logy1 # constant trend