<?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: Calculate Cpk for Last 50 results in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Calculate-Cpk-for-Last-50-results/m-p/324671#M57403</link>
    <description>&lt;P&gt;Thank you that works really well!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've got about 50 columns of data which I am calculating Cpk values for and I'm wondering if there is an easy way to select these columns without having to hard code the column names when computing the Process Screening as you have done in the example with NPN1 and PNP1. I want to do something like the following to get the column names but it doesn't work in it's current state:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;cNames = dt &amp;lt;&amp;lt; Get Column Names( Numeric, "Continuous" );
scr = dt &amp;lt;&amp;lt; Process Screening( Y( cNames ), Control Chart Type( "Indiv and MR" ) );&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 22 Oct 2020 10:30:45 GMT</pubDate>
    <dc:creator>Vicki36</dc:creator>
    <dc:date>2020-10-22T10:30:45Z</dc:date>
    <item>
      <title>Calculate Cpk for Last 50 results</title>
      <link>https://community.jmp.com/t5/Discussions/Calculate-Cpk-for-Last-50-results/m-p/324579#M57392</link>
      <description>&lt;P&gt;Hi, is there a simple way to calculate Cpk for only a selected number of the most recent rows by using scripts. I am looking at machine capability and although the overall Cpk is a very useful metric to identify overall process capability, once improvements have been made to the manufacturing process, I want a way to easily track if the process is improving by only looking at the Cpk for the last 50 results. I currently have a script which automatically calculates the Cpk and other metrics by performing the 'Process Screening' and saving it to a summary table. If possible I want to be able to have the overall Cpk and Cpk of the last 50 components in 2 columns next to each other in the same data table. Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Sat, 10 Jun 2023 23:20:53 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Calculate-Cpk-for-Last-50-results/m-p/324579#M57392</guid>
      <dc:creator>Vicki36</dc:creator>
      <dc:date>2023-06-10T23:20:53Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Cpk for Last 50 results</title>
      <link>https://community.jmp.com/t5/Discussions/Calculate-Cpk-for-Last-50-results/m-p/324622#M57394</link>
      <description>&lt;P&gt;Here is a simple script that can be used to get the Cp/Cpk for the last 50 rows in your data table.&amp;nbsp; It generates the same table that your Process Screening generated, but this time, with just the 2 variables you want, and just for the last 50 rows of data.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ps.PNG" style="width: 937px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/27542i088390AE1AEA8D91/image-size/large?v=v2&amp;amp;px=999" role="button" title="ps.PNG" alt="ps.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/semiconductor capability.jmp" );
dt &amp;lt;&amp;lt; select where( Row() &amp;lt; N Rows( dt ) - 50 );
dt &amp;lt;&amp;lt; hide and exclude;


ps = dt &amp;lt;&amp;lt; Process Screening( Y( :NPN1, :PNP1 ), Control Chart Type( "Indiv and MR" ) );
newdt = ps &amp;lt;&amp;lt; get data table;

dt &amp;lt;&amp;lt; clear rowstates;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 21 Oct 2020 14:10:51 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Calculate-Cpk-for-Last-50-results/m-p/324622#M57394</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2020-10-21T14:10:51Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Cpk for Last 50 results</title>
      <link>https://community.jmp.com/t5/Discussions/Calculate-Cpk-for-Last-50-results/m-p/324671#M57403</link>
      <description>&lt;P&gt;Thank you that works really well!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've got about 50 columns of data which I am calculating Cpk values for and I'm wondering if there is an easy way to select these columns without having to hard code the column names when computing the Process Screening as you have done in the example with NPN1 and PNP1. I want to do something like the following to get the column names but it doesn't work in it's current state:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;cNames = dt &amp;lt;&amp;lt; Get Column Names( Numeric, "Continuous" );
scr = dt &amp;lt;&amp;lt; Process Screening( Y( cNames ), Control Chart Type( "Indiv and MR" ) );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 22 Oct 2020 10:30:45 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Calculate-Cpk-for-Last-50-results/m-p/324671#M57403</guid>
      <dc:creator>Vicki36</dc:creator>
      <dc:date>2020-10-22T10:30:45Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Cpk for Last 50 results</title>
      <link>https://community.jmp.com/t5/Discussions/Calculate-Cpk-for-Last-50-results/m-p/324672#M57404</link>
      <description>&lt;P&gt;Here is the solution.....&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/semiconductor capability.jmp" );

cNames = dt &amp;lt;&amp;lt; Get Column Names(Numeric, "Continuous");
// shorten list for illustration purposes
remove from( cNames, 3, 128);

dt &amp;lt;&amp;lt; select where( Row() &amp;lt; N Rows( dt ) - 50 );
dt &amp;lt;&amp;lt; hide and exclude;


ps = dt &amp;lt;&amp;lt; Process Screening( Y( eval(cNames) ), Control Chart Type( "Indiv and MR" ) );
newdt = ps &amp;lt;&amp;lt; get data table;

dt &amp;lt;&amp;lt; clear rowstates;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Your experiences with JSL will be greatly enhanced if you take the time to read the Scripting Guide.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Oct 2020 15:36:51 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Calculate-Cpk-for-Last-50-results/m-p/324672#M57404</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2020-10-21T15:36:51Z</dc:date>
    </item>
  </channel>
</rss>

