* * Example TABLE6-7.DAT from page 218 * open data table6-7.dat data(format=free,org=columns) 1 30 data * filter(type=lagging,width=3) data / ma3 filter(type=lagging,width=3) ma3 / ma3x3 * set a = 2*ma3-ma3x3 set b = 2.0/(3-1)*(ma3-ma3x3) * set forecast = a{1}+b{1} set error = data-forecast * print(picture="*.##") / data ma3 ma3x3 a b forecast error * graph(footer="Figure 6-4. Single and Double Moving Averages",key=below) 4 # data # ma3 # ma3x3 # forecast