<?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: Additional functions for summary table via JSL in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Additional-functions-for-summary-table-via-JSL/m-p/778829#M96026</link>
    <description>&lt;P&gt;In JMP there are many ways to generate grouped summary statistics. Every method provides some statistics - and doesn't provide others.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Distribution platform and Header Statistics are far ahead of the others (Graph Builder, JSL Col ... function).&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.jmp.com/t5/Community-Wish-List/Wish-list-new-Label-user-experience/idc-p/771691/highlight/true#M60" target="_blank"&gt;https://community.jmp.com/t5/Community-Wish-List/Wish-list-new-Label-user-experience/idc-p/771691/highlight/true#M60&lt;/A&gt;&amp;nbsp;&lt;BR /&gt;I'd guess that the programmers of the other platforms are eager to catch up ...&lt;/P&gt;</description>
    <pubDate>Sat, 03 Aug 2024 15:46:16 GMT</pubDate>
    <dc:creator>hogi</dc:creator>
    <dc:date>2024-08-03T15:46:16Z</dc:date>
    <item>
      <title>Additional functions for summary table via JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Additional-functions-for-summary-table-via-JSL/m-p/423143#M67231</link>
      <description>&lt;P&gt;I would like to know how I can obtain summary tables but with additional statistics.&lt;/P&gt;&lt;P&gt;For example, &lt;STRONG&gt;Mode()&lt;/STRONG&gt; is a function that one can use in a formula, but this does not work:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );

dt &amp;lt;&amp;lt; Summary( Group( :Age ),
             subgroup( :sex ),
             Mode( :Height ));&amp;nbsp;&amp;nbsp;//&amp;nbsp;Mode&amp;nbsp;isntead&amp;nbsp;of&amp;nbsp;mean&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I would also like to summarize the table by getting the last or first number of the group.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Jun 2023 23:37:51 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Additional-functions-for-summary-table-via-JSL/m-p/423143#M67231</guid>
      <dc:creator>FN</dc:creator>
      <dc:date>2023-06-10T23:37:51Z</dc:date>
    </item>
    <item>
      <title>Re: Additional functions for summary table via JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Additional-functions-for-summary-table-via-JSL/m-p/423220#M67236</link>
      <description>&lt;P&gt;FWIW (and if you know a little JSL), you can do this kind of thing:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );

// Sample data
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );

// Invisible Distribution with 'By' group(s)
dist = dt &amp;lt;&amp;lt; Distribution(Continuous Distribution(Column( :height ),Customize Summary Statistics(Mode(1))), By(:age, :sex), Invisible);

// Get the Summary Stats
dt2 = Report(dist[1])[TableBox(2)] &amp;lt;&amp;lt; makeCombinedDataTable;
Report(dist[1]) &amp;lt;&amp;lt; closeWindow;

// Retain only the Mode
dt3 = dt2 &amp;lt;&amp;lt; Subset(Rows(dt2 &amp;lt;&amp;lt; getRowsWhere(:Column 1 == "Mode")));
dt3 &amp;lt;&amp;lt; setName("Mode Values");
Column(dt3, "Column 1") &amp;lt;&amp;lt; setName("Statistic");
Column(dt3, "Column 2") &amp;lt;&amp;lt; setName("Value");
Close(dt2, NoSave);
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I would also consider the &lt;A href="https://community.jmp.com/t5/JMP-Wish-List/idb-p/jmp-wish-list" target="_self"&gt;JMP Wish List&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Oct 2021 09:15:13 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Additional-functions-for-summary-table-via-JSL/m-p/423220#M67236</guid>
      <dc:creator>ian_jmp</dc:creator>
      <dc:date>2021-10-04T09:15:13Z</dc:date>
    </item>
    <item>
      <title>Re: Additional functions for summary table via JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Additional-functions-for-summary-table-via-JSL/m-p/423233#M67238</link>
      <description>&lt;P&gt;hi &lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/13827"&gt;@FN&lt;/a&gt; ,&lt;/P&gt;
&lt;P&gt;there must be many ways to get what you are asking for even though Mode is not an option in the table summary. You can ask for the Mode in the additional summary statistics table in the distribution platform manually or by clicking as&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/3605"&gt;@ian_jmp&lt;/a&gt; suggests. Otherwise, try using the&amp;nbsp; add in by brady_brady :&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.jmp.com/t5/JMP-Blog/Extended-Summary-Statistics-Add-in-for-JMP/ba-p/30234" target="_blank" rel="noopener"&gt;Extended-Summary-Statistics-Add-in-for-JMP&lt;/A&gt; which refferes the mode from the menu.&lt;/P&gt;
&lt;P&gt;alternatively, try the following script:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );

// Open Data Table: Big Class.jmp
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );


// get frequencies for modes 
dt2 = dt &amp;lt;&amp;lt; Summary(
	Group( :Age, :sex, :height ),
	Link to original data table( 0 )

);

// delete all rows that are not modes
dt2 &amp;lt;&amp;lt; select where( Or( :N Rows != Col Max( :N Rows, :age, :sex ), :N Rows == 1 ) );
dt2 &amp;lt;&amp;lt; delete rows;

// indicate first and last values per group - Not min and max unless table is first sorted!!!
dt &amp;lt;&amp;lt; New Column( "id age", Numeric, "Continuous", Format( "Best", 12 ), Formula( Sum( :age[Index( 1, Row() )] == :age ) ), eval formula, );
dt:id age &amp;lt;&amp;lt; delete formula;

// remove all rows that are not first or last
dt &amp;lt;&amp;lt; select where( And( :id age != Col Max( :id age, :age ), :id age != 1 ) );
dt &amp;lt;&amp;lt; delete rows;

// create one table with all data and sort it
dt3 = dt &amp;lt;&amp;lt; concatenate( dt2, Create source column );
dt3 &amp;lt;&amp;lt; New Column( "Value",
	Character,
	"Ordinal",
	Formula( If( :id age == 1, "First", :id age &amp;gt; 1, "Last", :N Rows &amp;gt; 1, "Mode" ) ),
	Set Property( "Value Order", {Custom Order( {"First", "Mode", "Last"} ), Common Order( 0 )} ),

);

dt3 &amp;lt;&amp;lt; sort( By( :age, :sex, :Value ), Order( Ascending ), replace table );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;please notice that in the case of Big class, not all groups have a clear mode. my approach was to remove it the highest frequency was equal to 1.&lt;/P&gt;
&lt;P&gt;please let us know if it works or what needs improvement.&lt;/P&gt;
&lt;P&gt;Ron&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Oct 2021 10:10:59 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Additional-functions-for-summary-table-via-JSL/m-p/423233#M67238</guid>
      <dc:creator>ron_horne</dc:creator>
      <dc:date>2021-10-04T10:10:59Z</dc:date>
    </item>
    <item>
      <title>Re: Additional functions for summary table via JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Additional-functions-for-summary-table-via-JSL/m-p/423251#M67239</link>
      <description>&lt;P&gt;Nice trick using the distributions platform as a way to obtain these.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have added the request here.&amp;nbsp;&lt;LI-MESSAGE title="Extending summary table functions to any defined function (e.g. mode, kurt, skew, etc.)" uid="423250" url="https://community.jmp.com/t5/JMP-Wish-List/Extending-summary-table-functions-to-any-defined-function-e-g/m-p/423250#U423250" 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;</description>
      <pubDate>Tue, 05 Oct 2021 12:58:33 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Additional-functions-for-summary-table-via-JSL/m-p/423251#M67239</guid>
      <dc:creator>FN</dc:creator>
      <dc:date>2021-10-05T12:58:33Z</dc:date>
    </item>
    <item>
      <title>Re: Additional functions for summary table via JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Additional-functions-for-summary-table-via-JSL/m-p/424211#M67342</link>
      <description>&lt;P&gt;I was testing this approach and it is not feasible, I am afraid.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;JMP takes too long to use show distributions when regrouping many items in a big table (half a million rows and hundreds of columns).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Contrarily, default functions in the summary table are calculated very fast.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Oct 2021 10:34:49 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Additional-functions-for-summary-table-via-JSL/m-p/424211#M67342</guid>
      <dc:creator>FN</dc:creator>
      <dc:date>2021-10-07T10:34:49Z</dc:date>
    </item>
    <item>
      <title>Re: Additional functions for summary table via JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Additional-functions-for-summary-table-via-JSL/m-p/424231#M67343</link>
      <description>&lt;P&gt;You can make summary tables (or any tables function ) much faster using by settingtheir visibility&amp;nbsp; - private, invisible, visible. when i worked with very large files and only needed to extract the modes i used private.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Oct 2021 11:26:07 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Additional-functions-for-summary-table-via-JSL/m-p/424231#M67343</guid>
      <dc:creator>ron_horne</dc:creator>
      <dc:date>2021-10-07T11:26:07Z</dc:date>
    </item>
    <item>
      <title>Re: Additional functions for summary table via JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Additional-functions-for-summary-table-via-JSL/m-p/778829#M96026</link>
      <description>&lt;P&gt;In JMP there are many ways to generate grouped summary statistics. Every method provides some statistics - and doesn't provide others.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Distribution platform and Header Statistics are far ahead of the others (Graph Builder, JSL Col ... function).&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.jmp.com/t5/Community-Wish-List/Wish-list-new-Label-user-experience/idc-p/771691/highlight/true#M60" target="_blank"&gt;https://community.jmp.com/t5/Community-Wish-List/Wish-list-new-Label-user-experience/idc-p/771691/highlight/true#M60&lt;/A&gt;&amp;nbsp;&lt;BR /&gt;I'd guess that the programmers of the other platforms are eager to catch up ...&lt;/P&gt;</description>
      <pubDate>Sat, 03 Aug 2024 15:46:16 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Additional-functions-for-summary-table-via-JSL/m-p/778829#M96026</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2024-08-03T15:46:16Z</dc:date>
    </item>
  </channel>
</rss>

