Version: SAS 9.2 TS2M0
I have been working with proc shewhart to create control charts in ODS. What I have done is add a label statement to label points on a shewhart control chart that are out of control by their count number (outlabel= option). This works perfect when I am using both control limits, but when I do this with one control limit, it does not work. I am looking for anyway to fix this, or a different way to do this. I have also tried to just use the testlabel1= option, but that did not work as well.
Code for proc shewhart section:
/* Individuals Chart */
proc shewhart history=data2;
irchart &test*lot_count='*' / outlabel=(lot_count) testlabel1=' ' testlabel2=' ' nochart2 vref=vref ciindices lsl=&lsl usl=&usl readphases=all phaselegend vreflabpos=2 nolcl zerostd clipfactor=2 tests=1 to 4 totpanels=1;
inset stddev cpklcl='Cpk 95% Lower' cpk='Cpk' cpkucl='Cpk 95% Upper';
label &var="&var (&units)";
run;
Sample Data:
Count AV
15 | 2.40 |
16 | 3.50 |
17 | 3.10 |
18 | 7.00 |
19 | 2.90 |
20 | 2.70 |
21 | 2.30 |
22 | 3.50 |
23 | 2.00 |
24 | 1.90 |
25 | 3.00 |
26 | 1.30 |
27 | 3.00 |
28 | 1.10 |
29 | 1.30 |
30 | 1.30 |
31 | 3.30 |
32 | 2.70 |
33 | 2.30 |
34 | 9.50 |
35 | 2.30 |
36 | 7.30 |
37 | 6.80 |
38 | 3.80 |
39 | 1.70 |
40 | 5.20 |
41 | 3.20 |
42 | 2.00 |
43 | 3.40 |
44 | 2.80 |
45 | 4.40 |
46 | 6.10 |
47 | 1.40 |
48 | 3.50 |
49 | 8.90 |
50 | 12.40 |
51 | 4.90 |
52 | 7.70 |
53 | 0.90 |
54 | 2.20 |
55 | 1.40 |
56 | 5.00 |
57 | 4.40 |
58 | 3.50 |
59 | 3.10 |
60 | 2.30 |
61 | 2.50 |
62 | 2.10 |
63 | 2.30 |
With an upper specification limit of 15.
As just by looking at the data, they are within specification, but 2 points are outside of the upper control limit. The outlabel= or test1label= option is not labeling them for some reason, I guess because of the "noucl" option in proc shewhart. So I need some other way to label them in the plot by count.
Thanks,
Jeff
Message was edited by: Jeff Ollis
You might want to make some example data available to replicate the issue as well as values of the macro variables referenced.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.