Good morning, Andrew. It's been awhile since I've looked at these so I'm rusty, but here is an example:
DATA LIST FREE /rainfall.
BEGIN DATA.
1.56 0.52 1.01
1.23 3.14 1.97
5.37 2.56 2.59
0.76 2.54 3.31
0.81 1.21 1.21
4.37 5.32 3.02
5.92 3.10 5.58
1.37 1.42 0.54
END DATA.
COMPUTE lag_rain=abs(rainfall-lag(rainfall)).
DESCRIPTIVES variables rainfall lag_rain.
GRAPH /LINE(SIMPLE)=VALUE(rainfall).
GRAPH /LINE(SIMPLE)=VALUE(lag_rain).
SPCHART /IR=rainfall /SPAN=2 /SIGMAS=3.
As you can see, the charts measure different things. The first is a simple line chart of the observations, and SPCHART overlays the average of those as a reference. The second (moving range) uses uses a lag function to calculate the difference from an observation ( say "j") from the previous one ("j-1"), and overlays a line of the average of those "ranges". The upper and lower confidence limits are determined by standard formulas available in the
Algorithms manual. Of course, violations of the rules depend on which chart they refer to.
------------------------------
Rick Marcantonio
Quality Assurance
IBM
------------------------------