<?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: Why is my column mean not matching with one calculated via the distribution platform, after excluding row(s)? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Why-is-my-column-mean-not-matching-with-one-calculated-via-the/m-p/702430#M88677</link>
    <description>&lt;P&gt;Col Mean() does not honor the Excluded rows like the JMP Platforms do.&amp;nbsp; If you use:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;colMeanNew = Col Mean( If( Excluded( Row State( Row() ) ), ., dt:colName ) );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;it will give you the result you want.&lt;/P&gt;</description>
    <pubDate>Fri, 24 Nov 2023 00:25:58 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2023-11-24T00:25:58Z</dc:date>
    <item>
      <title>Why is my column mean not matching with one calculated via the distribution platform, after excluding row(s)?</title>
      <link>https://community.jmp.com/t5/Discussions/Why-is-my-column-mean-not-matching-with-one-calculated-via-the/m-p/702423#M88676</link>
      <description>&lt;P&gt;Calculating column mean before and after excluding a row is giving me same values via JSL. It is different as expected when obtained from the distribution platform. Where am I going wrong in JSL?&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
Clear Log();
dt = Open( "$sample_data\Semiconductor Capability.jmp" ); // get data table
//get spec limits into column properties 
obj = dt &amp;lt;&amp;lt; Manage Spec Limits( Y( dt &amp;lt;&amp;lt; Get Column Group( "Processes" ) ), Show Limits All,  Save to Column Properties(1) ); 
obj &amp;lt;&amp;lt; close window;  // close Manage Spec Limits window
colName  =  "M1_M1"; // choose column
colMean = Col Mean(dt:colName); show (colMean); // get column mean
colMin  = Col Minimum(dt:colName); show (colMin); // get column minimum value
//plot distribution
Distribution(Stack(1), Continuous Distribution(Column(:M1_M1 ), Horizontal Layout(1),Vertical(0), Process Capability(0)));
dt &amp;lt;&amp;lt; select where( dt:colName == colMin)&amp;lt;&amp;lt; Hide and Exclude; // hide and exclude the minimim value of the column
colMeanNew  = Col Mean(dt:colName); show (colMeanNew); // get column mean again
//plot distribution again
Distribution(Stack(1), Continuous Distribution(Column(:M1_M1 ), Horizontal Layout(1),Vertical(0), Process Capability(0)));&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Neo_0-1700783477443.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/59053iD478B40A331D1138/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Neo_0-1700783477443.png" alt="Neo_0-1700783477443.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Neo_1-1700783494869.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/59054i5765B5FB4948B457/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Neo_1-1700783494869.png" alt="Neo_1-1700783494869.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Neo_2-1700783791381.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/59055i4BC7C6AA84EBD4EA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Neo_2-1700783791381.png" alt="Neo_2-1700783791381.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Nov 2023 23:58:12 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Why-is-my-column-mean-not-matching-with-one-calculated-via-the/m-p/702423#M88676</guid>
      <dc:creator>Neo</dc:creator>
      <dc:date>2023-11-23T23:58:12Z</dc:date>
    </item>
    <item>
      <title>Re: Why is my column mean not matching with one calculated via the distribution platform, after excluding row(s)?</title>
      <link>https://community.jmp.com/t5/Discussions/Why-is-my-column-mean-not-matching-with-one-calculated-via-the/m-p/702430#M88677</link>
      <description>&lt;P&gt;Col Mean() does not honor the Excluded rows like the JMP Platforms do.&amp;nbsp; If you use:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;colMeanNew = Col Mean( If( Excluded( Row State( Row() ) ), ., dt:colName ) );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;it will give you the result you want.&lt;/P&gt;</description>
      <pubDate>Fri, 24 Nov 2023 00:25:58 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Why-is-my-column-mean-not-matching-with-one-calculated-via-the/m-p/702430#M88677</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2023-11-24T00:25:58Z</dc:date>
    </item>
    <item>
      <title>Re: Why is my column mean not matching with one calculated via the distribution platform, after excluding row(s)?</title>
      <link>https://community.jmp.com/t5/Discussions/Why-is-my-column-mean-not-matching-with-one-calculated-via-the/m-p/702464#M88679</link>
      <description>&lt;P&gt;&lt;LI-MESSAGE title="Col Functions and Row States" uid="351705" url="https://community.jmp.com/t5/Discussions/Col-Functions-and-Row-States/m-p/351705#U351705" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-forum-thread lia-fa-icon lia-fa-forum lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt;&amp;nbsp;is a good read regarding this. If you don't mind that the excluded rows will&amp;nbsp; be treated as their own group, you can also use&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Col Mean(dt:colName, Excluded())&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;When using Col functions in this manner in your script (not in formula) and you have multiple groups (Excluded will have its own group), you have to be a bit careful. You can either modify the current row to be non-excluded onw (Row() = something) or create a formula with the Col function.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Other option would be to use Summarize()&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;summarize(dt, my_mean = Mean(dt:colName));&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 24 Nov 2023 05:36:43 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Why-is-my-column-mean-not-matching-with-one-calculated-via-the/m-p/702464#M88679</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2023-11-24T05:36:43Z</dc:date>
    </item>
    <item>
      <title>Re: Why is my column mean not matching with one calculated via the distribution platform, after excluding row(s)?</title>
      <link>https://community.jmp.com/t5/Discussions/Why-is-my-column-mean-not-matching-with-one-calculated-via-the/m-p/702628#M88695</link>
      <description>&lt;P&gt;Note that column formulas with excluded() are re-evaluated each time the row selection is changed:&lt;/P&gt;&lt;P&gt;&lt;LI-MESSAGE title="Caution: Places where Jmp does something unexpected" uid="699820" url="https://community.jmp.com/t5/Discussions/Caution-Places-where-Jmp-does-something-unexpected/m-p/699820#U699820" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-forum-thread lia-fa-icon lia-fa-forum lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For small data tables, this is fine: for large data tables, this causes a noticeable delay.&lt;/P&gt;&lt;P&gt;This problem will be fixed in Jmp 18.&lt;/P&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;</description>
      <pubDate>Fri, 24 Nov 2023 19:26:27 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Why-is-my-column-mean-not-matching-with-one-calculated-via-the/m-p/702628#M88695</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2023-11-24T19:26:27Z</dc:date>
    </item>
  </channel>
</rss>

