BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.

Hi All,

 

I'm tyring to use PROC SHEWHART to make a control chart which computes different process limits for different phases.  Been reading the docs, and it looks like to do this I need to call PROC SHEWHART twice, and sort the data. Ugh. The first time I use OUTLIMITS to write a limits dataset, then the second time I create the chart.


Below is based on example from the SAS/QC Manual, "Displaying Multiple Sets of Control LimitsMultiple Sets of Control Limits". 

 

data Flange;
  input _phase_ $10. Sample FlwidthX FlwidthR FlwidthN;
  cards;
Production 6  0.97360 0.06247 5
Production 7  1.00486 0.11478 5
Production 8  1.00251 0.13537 5
Production 9  0.95509 0.08378 5
Production 10 1.00348 0.09993 5
Production 11 1.02566 0.06766 5
Production 12 0.97053 0.07608 5
Production 13 0.94713 0.10170 5
Production 14 1.00377 0.04875 5
Production 15 0.99604 0.08242 5
Change1    16 0.99218 0.09787 5
Change1    17 0.99526 0.02017 5
Change1    18 1.02235 0.10541 5
Change1    19 0.99950 0.11476 5
Change1    20 0.99271 0.05395 5
Change1    21 0.98695 0.03833 5
Change1    22 1.00969 0.06183 5
Change1    23 0.98791 0.05836 5
Change1    24 1.00170 0.05243 5
Change1    25 1.00412 0.04815 5
Change2    26 1.00261 0.05604 5
Change2    27 0.99553 0.02818 5
Change2    28 1.01463 0.05558 5
Change2    29 0.99812 0.03648 5
Change2    30 1.00047 0.04309 5
Change2    31 0.99714 0.03689 5
Change2    32 0.98642 0.04809 5
Change2    33 0.98891 0.07777 5
Change2    34 1.00087 0.06409 5
Change2    35 1.00863 0.02649 5
;
run;

proc sort data=Flange;
  by _phase_ Sample;
run;

proc shewhart history=Flange;
   xchart Flwidth*Sample /
     nochart
     outlimits=MyLimits(rename=(_phase_=_index_))
   ;
   by _phase_;
run;

proc sort data=Flange;
  by Sample;
run;

*Feed the limits dataset back into Shewhart;

proc shewhart history=Flange limits=MyLimits;
   xchart Flwidth*Sample /
      readphases  = all
      readindexes = all
      phaseref
      phaselegend 
   ;
run;

 

Before I proceed, wanted to make sure I'm not missing some other way to make a phased chart with just one call to PROC SHEWHART.  Feels like I want a PHASE option, pseudo-code:

 

proc shewhart history=Flange;
   xchart Flwidth*Sample /
      phase=_phase_
   ;
run;

 

 

 

Thanks,

--Q.

The Boston Area SAS Users Group is hosting free webinars!
Next webinar will be in January 2025. Until then, check out our archives: https://www.basug.org/videos. And be sure to subscribe to our our email list.
1 ACCEPTED SOLUTION

Accepted Solutions
Rick_SAS
SAS Super FREQ

I have never done this myself, but I read the syntax portion of the doc as well as the section on "Displaying Multiple Sets of Control Limits," and it looks like you are doing what the doc recommends.  The examples they give make two calls: one to create the limits and one to incorporate them,

View solution in original post

2 REPLIES 2
Rick_SAS
SAS Super FREQ

I have never done this myself, but I read the syntax portion of the doc as well as the section on "Displaying Multiple Sets of Control Limits," and it looks like you are doing what the doc recommends.  The examples they give make two calls: one to create the limits and one to incorporate them,

Quentin
Super User

Thanks @Rick_SAS, I will mosey over and submit this as a ballot item.

The Boston Area SAS Users Group is hosting free webinars!
Next webinar will be in January 2025. Until then, check out our archives: https://www.basug.org/videos. And be sure to subscribe to our our email list.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 2006 views
  • 0 likes
  • 2 in conversation