<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic PROC SHEWHART chart with phases in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-SHEWHART-chart-with-phases/m-p/281170#M14808</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm tyring to use PROC SHEWHART to make a control chart which computes different process limits for different phases.&amp;nbsp; Been reading the docs, and it looks like to do this I need to call PROC SHEWHART twice, and sort the data. Ugh.&amp;nbsp;The first time I use OUTLIMITS to write a limits dataset, then the second time I create the chart.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Below is based on example from the SAS/QC Manual, "Displaying Multiple Sets of Control LimitsMultiple Sets of Control Limits".&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;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;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;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.&amp;nbsp; Feels like I want a PHASE option, pseudo-code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc shewhart history=Flange;
   xchart Flwidth*Sample /
      phase=_phase_
   ;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;--Q.&lt;/P&gt;</description>
    <pubDate>Wed, 29 Jun 2016 17:11:00 GMT</pubDate>
    <dc:creator>Quentin</dc:creator>
    <dc:date>2016-06-29T17:11:00Z</dc:date>
    <item>
      <title>PROC SHEWHART chart with phases</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-SHEWHART-chart-with-phases/m-p/281170#M14808</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm tyring to use PROC SHEWHART to make a control chart which computes different process limits for different phases.&amp;nbsp; Been reading the docs, and it looks like to do this I need to call PROC SHEWHART twice, and sort the data. Ugh.&amp;nbsp;The first time I use OUTLIMITS to write a limits dataset, then the second time I create the chart.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Below is based on example from the SAS/QC Manual, "Displaying Multiple Sets of Control LimitsMultiple Sets of Control Limits".&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;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;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;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.&amp;nbsp; Feels like I want a PHASE option, pseudo-code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc shewhart history=Flange;
   xchart Flwidth*Sample /
      phase=_phase_
   ;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;--Q.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jun 2016 17:11:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-SHEWHART-chart-with-phases/m-p/281170#M14808</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2016-06-29T17:11:00Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SHEWHART chart with phases</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-SHEWHART-chart-with-phases/m-p/281182#M14810</link>
      <description>&lt;P&gt;I have never done this myself, but I read the syntax portion of the doc as well as the section on &lt;A href="http://support.sas.com/documentation/cdl/en/qcug/68161/HTML/default/viewer.htm#qcug_shewhart_sect474.htm" target="_self"&gt;"Displaying Multiple Sets of Control Limits,"&lt;/A&gt;&amp;nbsp;and it looks like you are doing what the doc recommends. &amp;nbsp;The examples they give make two calls: one to create the limits and one to incorporate them,&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jun 2016 17:53:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-SHEWHART-chart-with-phases/m-p/281182#M14810</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2016-06-29T17:53:37Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SHEWHART chart with phases</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-SHEWHART-chart-with-phases/m-p/281426#M14820</link>
      <description>&lt;P&gt;Thanks &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13684"&gt;@Rick_SAS&lt;/a&gt;, I will mosey over and submit this as a ballot item.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jun 2016 13:28:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-SHEWHART-chart-with-phases/m-p/281426#M14820</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2016-06-30T13:28:42Z</dc:date>
    </item>
  </channel>
</rss>

