options crt; ? 7e7 ? ? TSP doesn't have any explicit smoothing commands. However, ? Some smoothing models are supposed to be exactly equivalent to ? certain ARIMA models, so those are used here. ? in nerc; freq a; smpl 51,84; lnkwh = log(kwh); trend year 1951; smpl 74,85; gra=0; grb=0; grc=0; grd=0; ? initialize growth rate forecasts ? (this step is not really required, but is a good idea in ? general when a series are accumulated one observation at ? a time as is done below) alpha = 0; do f=74,85; set t1 = f-10; set t2 = f-1; smpl t1,t2; olsq(silent) lnkwh c year; smpl f,f; gra = @coef(2); ? forecasted growth rate enddo; smpl 74,85; print gra; ? (a) ? smpl 52,84; lnk1 = lnkwh - lnkwh(-1); supres regout; do f=74,85; set t2 = f-1; smpl 52,t2; bjest(ndiff=1,nma=1,noprint,noplot,nocumplo) lnk1; ? ARIMA(0,1,1) = exp. smoothing model; alpha = 1 - THETA1 bjfrcst(nhoriz=10,noprint,noplot) lnk1; set f9 = f+9; smpl f,f9; msd(noprint) @fit; set grb(f) = @mean; set alpha(f) = 1-@coef; ? save the alpha value for part (c) enddo; smpl 74,85; print grb; ? (b) ? smpl 51,51; lnk1s = lnk1(1); ? start the smoothed value at the actual value for below do f=74,85; set t2 = f-1; set a = alpha(f); ? get the alpha value from part (b) smpl 52,t2; lnk1s = a*lnk1 + (1-a)*lnk1s(-1); ? form singly-smoothed series bjest(ndiff=1,nma=1,noprint,noplot,nocumplo) lnk1s; ? ARIMA(0,1,1) = exp. smoothing model; alpha = 1 - THETA1 bjfrcst(nhoriz=10,noprint,noplot) lnk1s; set f9 = f+9; smpl f,f9; msd(noprint) @fit; set grc(f) = @mean; enddo; smpl 74,85; print grc; ? (c) ? do f=74,85; set t2 = f-1; smpl 52,t2; bjest(ndiff=2,nma=2,noprint,noplot,nocumplo) lnk1; ? ARIMA(0,2,2) = Holt-Winters 2 param bjfrcst(nhoriz=10,noprint,noplot) lnk1; set f9 = f+9; smpl f,f9; msd(noprint) @fit; set grd(f) = @mean; enddo; smpl 74,85; print grd; ? (d)