Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
XCHART Statement

Creating Charts for Means from Raw Data

See SHWXCHR in the SAS/QC Sample Library

Subgroup samples of five parts are taken from the manufacturing process at regular intervals, and the width of a critical gap in each part is measured in millimeters. The following statements create a SAS data set named PARTGAPS, which contains the gap width measurements for 21 samples:

   data partgaps;
      input sample @;
      do i=1 to 5;
         input partgap @;
         output;
         end;
      drop i;
      label partgap='Gap Width'
            sample ='Sample Index';
      datalines;
    1 255 270 268 290 267
    2 260 240 265 262 263
    3 238 236 260 250 256
    4 260 242 281 254 263
    5 268 260 279 289 269
    6 270 249 265 253 263
    7 280 260 256 256 243
    8 229 266 250 243 252
    9 250 270 245 273 262
   10 248 258 247 266 256
   11 280 251 252 270 287
   12 245 253 243 279 245
   13 268 260 289 275 273
   14 264 286 275 271 279
   15 271 257 263 247 247
   16 291 250 273 265 266
   17 228 253 240 260 264
   18 270 260 269 245 276
   19 259 257 246 271 257
   20 252 244 230 266 248
   21 254 251 239 233 263
   ;

A listing of PARTGAPS is shown in Figure 42.1.

 
The Data Set PARTGAPS

sample partgap
1 255
1 270
1 268
1 290
1 267
2 260
2 240
2 265
2 262
2 263
3 238
3 236
3 260
3 250
3 256
4 260
4 242
4 281
4 254
4 263
5 268
5 260
5 279
5 289
5 269
6 270
6 249
6 265
6 253
6 263
7 280
7 260
7 256
7 256
7 243
8 229
8 266
8 250
8 243
8 252
9 250
9 270
9 245
9 273
9 262
10 248
10 258
10 247
10 266
10 256
11 280
11 251
11 252
11 270
11 287
12 245
12 253
12 243
12 279
12 245
13 268
13 260
13 289
13 275
13 273
14 264
14 286
14 275
14 271
14 279
15 271
15 257
15 263
15 247
15 247
16 291
16 250
16 273
16 265
16 266
17 228
17 253
17 240
17 260
17 264
18 270
18 260
18 269
18 245
18 276
19 259
19 257
19 246
19 271
19 257
20 252
20 244
20 230
20 266
20 248
21 254
21 251
21 239
21 233
21 263
Figure 42.1: Listing of the Data Set PARTGAPS

The data set PARTGAPS is said to be in "strung-out" form, since each observation contains the sample number and gap width measurement for a single part. The first five observations contain the gap widths for the first sample, the second five observations contain the gap widths for the second sample, and so on. Because the variable SAMPLE classifies the observations into rational subgroups, it is referred to as the subgroup-variable. The variable PARTGAP contains the gap width measurements and is referred to as the process variable (or process for short).

The within-subgroup variability of the gap widths is known to be stable. You can use an \bar{X} chart to determine whether their mean level is in control. The following statements create the \bar{X}chart shown in Figure 42.2:

   title 'Mean Chart for Gap Widths';
   symbol v=dot c=yellow;
   proc shewhart data=partgaps;
      xchart partgap*sample / cframe   = vigb
                              cinfill  = vlib
                              cconnect = yellow
                              coutfill = red;
   run;
This example illustrates the basic form of the XCHART statement. After the keyword XCHART, you specify the process to analyze (in this case, PARTGAP) followed by an asterisk and the subgroup-variable (SAMPLE).

The input data set is specified with the DATA= option in the PROC SHEWHART statement.

For more information on the SYMBOL statement, refer to SAS/GRAPH Software: Reference.

Each point on the \bar{X} chart represents the average (mean) of the measurements for a particular sample. For instance, the mean plotted for the first sample is

[(255 + 270 + 268 + 290 + 267)/5] = 270   

xgs2.gif (5441 bytes)

Figure 42.2: \bar{X} Chart for Gap Width Data

Since all of the subgroup means lie within the control limits, it can be concluded that the mean level of the process is in statistical control.

By default, the control limits shown are 3\sigma limits estimated from the data; the formulas for the limits are given in Table 42.22. You can also read control limits from an input data set; see "Reading Preestablished Control Limits" .

For computational details, see "Constructing Charts for Means" . For details on reading raw measurements, see "DATA= Data Set" .

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.