<?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 Column statistics, such as mean for only selected rows. in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Column-statistics-such-as-mean-for-only-selected-rows/m-p/810190#M99204</link>
    <description>&lt;P&gt;Hi.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I qould like to have a jsl command to find either column mean, median, or sigma for the height column, but only where age is only 12 and 13.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried select rows, but I dont seem to get the correct result. If i use or not use the select rows, it still gives me the same numbers.&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Data Table( "table" ) &amp;lt;&amp;lt; Select where( :age== { 12, 13&amp;nbsp; });
&amp;nbsp; Sigma = Col Std Dev( As Column( "age" ) );
median = Col Mean( As Column( "age" ) );

show (Sigma);
show (median);

dt &amp;lt;&amp;lt; Clear Select;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I appreciate any help in this.&amp;nbsp;&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;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LogitElephant69_0-1731122458844.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/69991i1FBE54098A15233B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="LogitElephant69_0-1731122458844.png" alt="LogitElephant69_0-1731122458844.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 09 Nov 2024 03:24:56 GMT</pubDate>
    <dc:creator>LogitElephant69</dc:creator>
    <dc:date>2024-11-09T03:24:56Z</dc:date>
    <item>
      <title>Column statistics, such as mean for only selected rows.</title>
      <link>https://community.jmp.com/t5/Discussions/Column-statistics-such-as-mean-for-only-selected-rows/m-p/810190#M99204</link>
      <description>&lt;P&gt;Hi.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I qould like to have a jsl command to find either column mean, median, or sigma for the height column, but only where age is only 12 and 13.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried select rows, but I dont seem to get the correct result. If i use or not use the select rows, it still gives me the same numbers.&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Data Table( "table" ) &amp;lt;&amp;lt; Select where( :age== { 12, 13&amp;nbsp; });
&amp;nbsp; Sigma = Col Std Dev( As Column( "age" ) );
median = Col Mean( As Column( "age" ) );

show (Sigma);
show (median);

dt &amp;lt;&amp;lt; Clear Select;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I appreciate any help in this.&amp;nbsp;&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;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LogitElephant69_0-1731122458844.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/69991i1FBE54098A15233B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="LogitElephant69_0-1731122458844.png" alt="LogitElephant69_0-1731122458844.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 09 Nov 2024 03:24:56 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Column-statistics-such-as-mean-for-only-selected-rows/m-p/810190#M99204</guid>
      <dc:creator>LogitElephant69</dc:creator>
      <dc:date>2024-11-09T03:24:56Z</dc:date>
    </item>
    <item>
      <title>Re: Column statistics, such as mean for only selected rows.</title>
      <link>https://community.jmp.com/t5/Discussions/Column-statistics-such-as-mean-for-only-selected-rows/m-p/810191#M99205</link>
      <description>&lt;P&gt;Here is the way I would handle this&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Current Data Table();
sigma = Col Std Dev( If( :age == 12 | :age == 13, :Age, . ) );
Avg = Col Mean( If( :age == 12 | :age == 13, :Age, . ) );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 09 Nov 2024 03:43:02 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Column-statistics-such-as-mean-for-only-selected-rows/m-p/810191#M99205</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2024-11-09T03:43:02Z</dc:date>
    </item>
    <item>
      <title>Re: Column statistics, such as mean for only selected rows.</title>
      <link>https://community.jmp.com/t5/Discussions/Column-statistics-such-as-mean-for-only-selected-rows/m-p/810196#M99207</link>
      <description>&lt;P&gt;you asked for a JSL command - but maybe also interesting:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;a very useful new feature in JMP 18: &lt;STRONG&gt;header statistics&lt;/STRONG&gt;&lt;BR /&gt;they can be static - or (default setting) react on the row selection:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hogi_1-1731138077296.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/69993iC288075CE08E466E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="hogi_1-1731138077296.png" alt="hogi_1-1731138077296.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Via the preferences, the user can define which values are displayed.&lt;BR /&gt;It's amazing how many options are available.&lt;BR /&gt;I wish other platforms like Distribution, Tabulate, Summary, Summarize, and: &lt;STRONG&gt;Graph Builder&amp;nbsp; (!)&lt;BR /&gt;&lt;/STRONG&gt;had such a large selection of items to choose from.&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;here is the wish:&lt;BR /&gt;&lt;LI-MESSAGE title="Col N Categories - and all the others ..." uid="592610" url="https://community.jmp.com/t5/JMP-Wish-List/Col-N-Categories-and-all-the-others/m-p/592610#U592610" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-idea-thread lia-fa-icon lia-fa-idea 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;[what I miss the most: Col N Categories / N Unique in JSL and Graph Builder]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hogi_3-1731138564271.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/69995i04F47BA77A53C1EA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="hogi_3-1731138564271.png" alt="hogi_3-1731138564271.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="hogi_4-1731138578688.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/69996iC1FCC213B5A12AF6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="hogi_4-1731138578688.png" alt="hogi_4-1731138578688.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 09 Nov 2024 07:50:04 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Column-statistics-such-as-mean-for-only-selected-rows/m-p/810196#M99207</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2024-11-09T07:50:04Z</dc:date>
    </item>
  </channel>
</rss>

