<?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 Re: Proc Shewhart:  Reading Limits data into the INSET statement for CPK, CPKLCL, and CPKUCL in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Shewhart-Reading-Limits-data-into-the-INSET-statement-for/m-p/277672#M58776</link>
    <description>&lt;P&gt;You already have the limits in a SAS data set. To get those values to appear in the inset, you can use the DATA step to create an inset data set. &amp;nbsp;The inset data set contains the variables _LABEL_ and _VALUE_, and you can assign them any values you want. You use the DATA= keyword&amp;nbsp;on the INSET statement to specify the name of the inset data set. This enables you to completely customize the inset to display&amp;nbsp;whatever you want. See the &lt;A href="http://support.sas.com/documentation/cdl/en/qcug/68161/HTML/default/viewer.htm#qcug_shewhart_sect449.htm" target="_self"&gt;Getting Started Example for the INSET statement.&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 15 Jun 2016 20:35:40 GMT</pubDate>
    <dc:creator>Rick_SAS</dc:creator>
    <dc:date>2016-06-15T20:35:40Z</dc:date>
    <item>
      <title>Proc Shewhart:  Reading Limits data into the INSET statement for CPK, CPKLCL, and CPKUCL</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Shewhart-Reading-Limits-data-into-the-INSET-statement-for/m-p/277630#M58773</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;I am having an issue with my proc shewhart INSET values for CPK, CPKLCL, and CPKUCL. &amp;nbsp;What I am doing is I have a set of data, for example n=60, and with this data I need to split the chart where a shift in the process/mean takes place. &amp;nbsp;Such as there was a shift after data point 29, and starting with data point 30 I would want to calculated new control limits and capability estimates. &amp;nbsp;I have no problems showing the shifts in the charts and calculating the new control limits for each range of data using the _PHASE_ and _INDEX_ options. &amp;nbsp;Control limit and mean wise, everything looks great in the chart and aligns with the stats data set corresponding to the correct range of data. &amp;nbsp;However, the Capability estimates, which I want based just on the last phase of data, are not matching to the limits. &amp;nbsp;The current code I have has been provided below to help clear up the picture. &amp;nbsp;The data is simple height versus observation number.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;data physical;&lt;BR /&gt;set physical;&lt;BR /&gt;length _PHASE_ $2.;&lt;BR /&gt;if obs &amp;lt; 25 then _PHASE_ = 'A';&lt;BR /&gt;if obs &amp;gt;= 25 then _PHASE_ = 'B';&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(Phases created to determine with range of data gets which set of limits)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc shewhart data=physical;&lt;BR /&gt;where obs &amp;lt; 25;&lt;BR /&gt;irchart Height*obs='*' / nochart2 totpanels=1 ciindices lsl=60 usl=80 outlimits=stats2;&lt;BR /&gt;inset stddev cpklcl='Cpk 95% Lower' cpk='Cpk' cpkucl='Cpk 95% Upper' / pos=nw format=6.2;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(Creating the Stats2 data set to contain the limits for datapoints 1 through 24, or _PHASE_ 'A')&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data stats2;&lt;BR /&gt;set stats2;&lt;BR /&gt;length _INDEX_ $2.;&lt;BR /&gt;_INDEX_ = 'A';&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(adding the _INDEX_ variable to match the limits dataset with the range of data that contains the corresponding _PHASE_ 'A')&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc shewhart data=physical;&lt;BR /&gt;where obs &amp;gt;= 25;&lt;BR /&gt;irchart Height*obs='*' / nochart2 totpanels=1 ciindices lsl=60 usl=80 outlimits=stats3;&lt;BR /&gt;inset stddev cpklcl='Cpk 95% Lower' cpk='Cpk' cpkucl='Cpk 95% Upper' / pos=nw format=6.2;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;(Creating the Stats3 data set to contain the limits for datapoints 25&amp;nbsp;through last data point, or _PHASE_ 'B')&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data stats3;&lt;BR /&gt;set stats3;&lt;BR /&gt;length _INDEX_ $2.;&lt;BR /&gt;_INDEX_ = 'B';&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;(adding the _INDEX_ variable to match the limits dataset with the range of data that contains the corresponding _PHASE_ 'B')&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data stats;&lt;BR /&gt;set stats2 stats3;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(stacking data sets stats2 and stats3 into one data set to be read into proc shewhart)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc shewhart data=physical limits=stats;&lt;BR /&gt;irchart Height*obs='*' / nochart2 totpanels=1 ciindices lsl=60 usl=80 readindexes=all phaselegend;&lt;BR /&gt;inset stddev cpklcl='Cpk 95% Lower' cpk='Cpk' cpkucl='Cpk 95% Upper' / pos=nw format=6.2;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(Here is the proc shewhart procedure in which I have the phases with their respective limits; however, the capability indices are not from stats3 - Which leads me to my question of how do I get the INSET statement to read the data directly from the stats for _PHASE_ B)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I just run proc shewhart with obs &amp;gt;= 25, i get the correct capability information, but in the above procedure, it does not give me these sames estimates.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any help is greatly appreciated.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thank you,&lt;BR /&gt;Jeff S. O.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jun 2016 18:12:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Shewhart-Reading-Limits-data-into-the-INSET-statement-for/m-p/277630#M58773</guid>
      <dc:creator>Jolly</dc:creator>
      <dc:date>2016-06-15T18:12:22Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Shewhart:  Reading Limits data into the INSET statement for CPK, CPKLCL, and CPKUCL</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Shewhart-Reading-Limits-data-into-the-INSET-statement-for/m-p/277672#M58776</link>
      <description>&lt;P&gt;You already have the limits in a SAS data set. To get those values to appear in the inset, you can use the DATA step to create an inset data set. &amp;nbsp;The inset data set contains the variables _LABEL_ and _VALUE_, and you can assign them any values you want. You use the DATA= keyword&amp;nbsp;on the INSET statement to specify the name of the inset data set. This enables you to completely customize the inset to display&amp;nbsp;whatever you want. See the &lt;A href="http://support.sas.com/documentation/cdl/en/qcug/68161/HTML/default/viewer.htm#qcug_shewhart_sect449.htm" target="_self"&gt;Getting Started Example for the INSET statement.&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jun 2016 20:35:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Shewhart-Reading-Limits-data-into-the-INSET-statement-for/m-p/277672#M58776</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2016-06-15T20:35:40Z</dc:date>
    </item>
  </channel>
</rss>

