* * Example of AR model starting page 245 * 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})) linreg y # constant y{1 2 3} @regcorrs(number=24) * * UFORECAST does Univariate Forecasts using the last regression. The first * parameter is the target series for the forecast; the second and third give the * range that you want to forecast. You can use the STDERRS option to get the * series of estimated standard errors for the forecasts. As described in the text, * those are calculated as if the coefficients are known. * uforecast(stderrs=fstderrs) yfore 2006:6 2006:8 * * Use yfore and fstderrs to compute the lower and upper bounds for the confidence intervals. * set lower 2006:6 2006:8 = yfore-%invttest(.05,%ndf)*fstderrs set upper 2006:6 2006:8 = yfore+%invttest(.05,%ndf)*fstderrs * * Show the results with the output restricted to just four digits * print(picture="*.####") 2006:6 2006:8 yfore fstderrs lower upper