BookmarkSubscribeRSS Feed
Jolly
Calcite | Level 5

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

152.40
163.50
173.10
187.00
192.90
202.70
212.30
223.50
232.00
241.90
253.00
261.30
273.00
281.10
291.30
301.30
313.30
322.70
332.30
349.50
352.30
367.30
376.80
383.80
391.70
405.20
413.20
422.00
433.40
442.80
454.40
466.10
471.40
483.50
498.90
5012.40
514.90
527.70
530.90
542.20
551.40
565.00
574.40
583.50
593.10
602.30
612.50
622.10
632.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

1 REPLY 1
ballardw
Super User

You might want to make some example data available to replicate the issue as well as values of the macro variables referenced.

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

What is Bayesian Analysis?

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 937 views
  • 0 likes
  • 2 in conversation