<?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: finding the mode in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/finding-the-mode/m-p/8212#M8206</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much MS. it is very useful.&lt;/P&gt;&lt;P&gt;This way is actually more "honest" than other alternatives mentioned in this discussion since it also assesses the frequency of missing data. for example, running the following script returns some missing values as the mode.&lt;/P&gt;&lt;P&gt;dt = open ("$SAMPLE_DATA\Cars.jmp");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;mode_by_groups = Function( {collist}, // list of column names&lt;/P&gt;&lt;P&gt;&amp;nbsp; // Find mode of last column in collist&lt;/P&gt;&lt;P&gt;&amp;nbsp; Summarize( g = by( Eval( collist ) ), n = Count() );&lt;/P&gt;&lt;P&gt;&amp;nbsp; X = Design( g[1] ) :*&lt;/img&gt; n;&lt;/P&gt;&lt;P&gt;&amp;nbsp; i = Loc( V Max( Transpose( X == Repeat( V Max( X ), N Row( n ) ) ) ) );&lt;/P&gt;&lt;P&gt;&amp;nbsp; //Add grouping columns to new table&lt;/P&gt;&lt;P&gt;&amp;nbsp; dt11 = New Table( "modes" );&lt;/P&gt;&lt;P&gt;&amp;nbsp; For( k = 1, k &amp;lt;= N Items( collist ) - 1, k++,&lt;/P&gt;&lt;P&gt;&amp;nbsp; dt11 &amp;lt;&amp;lt; (New Column( char(collist&lt;K&gt;), Character, set values( g&lt;K&gt;&lt;I&gt; ) ));&lt;/I&gt;&lt;/K&gt;&lt;/K&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; );&lt;/P&gt;&lt;P&gt;&amp;nbsp; //Add Mode and N&lt;/P&gt;&lt;P&gt;&amp;nbsp; dt11 &amp;lt;&amp;lt; New Column( "Mode of " || char(collist&lt;K&gt;), Character, set values( g&lt;K&gt;&lt;I&gt; ) );&lt;/I&gt;&lt;/K&gt;&lt;/K&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; dt11 &amp;lt;&amp;lt; New Column( "N", set values( n&lt;I&gt; ) );&lt;/I&gt;&lt;/P&gt;&lt;P&gt;);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;mode_by_groups( {Make , R Leg } );&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="5711_Untitled.png" style="width: 759px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/321i28037638F8FD2789/image-size/medium?v=v2&amp;amp;px=400" role="button" title="5711_Untitled.png" alt="5711_Untitled.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 18 Oct 2016 20:35:24 GMT</pubDate>
    <dc:creator>ron_horne</dc:creator>
    <dc:date>2016-10-18T20:35:24Z</dc:date>
    <item>
      <title>finding the mode</title>
      <link>https://community.jmp.com/t5/Discussions/finding-the-mode/m-p/8204#M8198</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi everyone,&lt;/P&gt;&lt;P&gt;i would like to produce a table summery that gives the mode of a variable for each category of another variable.&lt;/P&gt;&lt;P&gt;ideally, this would work:&lt;/P&gt;&lt;P&gt;dt = open ("$SAMPLE_DATA/Mail Messages.jmp");&lt;BR /&gt;dt &amp;lt;&amp;lt; summary ( Group ( :From ), Mode (:To) );&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;alternatively, i would stack the table by "From" and calculate the mode at each row. yet, "Mode" is not an option in Table summary or column formula.&lt;/P&gt;&lt;P&gt;any ideas calculating the mode are welcome including in sending to SAS.&lt;/P&gt;&lt;P&gt;i am using JMP 10.&lt;/P&gt;&lt;P&gt;thank you,&lt;/P&gt;&lt;P&gt;Ron&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 Mar 2014 16:39:53 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/finding-the-mode/m-p/8204#M8198</guid>
      <dc:creator>ron_horne</dc:creator>
      <dc:date>2014-03-09T16:39:53Z</dc:date>
    </item>
    <item>
      <title>Re: finding the mode</title>
      <link>https://community.jmp.com/t5/Discussions/finding-the-mode/m-p/8205#M8199</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"&gt;&lt;SPAN style="color: black;"&gt;Hi &lt;/SPAN&gt;&lt;SPAN style="color: navy;"&gt;-&lt;/SPAN&gt;&lt;SPAN style="color: black;"&gt; the mode is the most common item&lt;/SPAN&gt;&lt;SPAN style="color: navy;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: black;"&gt; so you're after the person &lt;STRONG&gt;(&lt;/STRONG&gt;or presumably persons if there's a tie&lt;STRONG&gt;)&lt;/STRONG&gt; who received the most number of letters from each sender&lt;/SPAN&gt;&lt;SPAN style="color: navy;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: black;"&gt; is that right?&amp;nbsp; If so&lt;/SPAN&gt;&lt;SPAN style="color: navy;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: black;"&gt; I think the following ought to do it, although I've no doubt there's a much more elegant and/or shorter way.&amp;nbsp; I've deliberately left all the intermediate calculations&lt;/SPAN&gt;&lt;SPAN style="color: navy;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: black;"&gt; and named all the tables to leave an audit trail&lt;/SPAN&gt;&lt;SPAN style="color: navy;"&gt;:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;dt1 &lt;/SPAN&gt;&lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 9pt;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #0000dd; font-family: 'Courier New'; font-size: 9pt;"&gt;open&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt; &lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: purple; font-family: 'Courier New'; font-size: 9pt;"&gt;"$SAMPLE_DATA/Mail Messages.jmp"&lt;/SPAN&gt;&lt;SPAN style="color: black; font-size: 9pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 9pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;dt1 &lt;/SPAN&gt;&lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 9pt;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt; set name&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: purple; font-family: 'Courier New'; font-size: 9pt;"&gt;"dt1"&lt;/SPAN&gt;&lt;SPAN style="color: black; font-size: 9pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 9pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;dt2 &lt;/SPAN&gt;&lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 9pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt; dt1 &lt;/SPAN&gt;&lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 9pt;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt; Summary&lt;STRONG&gt;( &lt;/STRONG&gt;Group&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;/SPAN&gt;&lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 9pt;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;From &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 9pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt; N&lt;/SPAN&gt;&lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 9pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt; Subgroup&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;/SPAN&gt;&lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 9pt;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;To &lt;STRONG&gt;)&lt;/STRONG&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 9pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;dt2 &lt;/SPAN&gt;&lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 9pt;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt; set name&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: purple; font-family: 'Courier New'; font-size: 9pt;"&gt;"dt2"&lt;/SPAN&gt;&lt;SPAN style="color: black; font-size: 9pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 9pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;Sent_From &lt;/SPAN&gt;&lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 9pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt; &lt;STRONG&gt;(&lt;/STRONG&gt;dt2 &lt;/SPAN&gt;&lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 9pt;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt; get column names&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 9pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000dd; font-family: 'Courier New'; font-size: 9pt;"&gt;show&lt;/SPAN&gt;&lt;SPAN style="color: black; font-size: 9pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;Sent_From&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 9pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: green; font-family: 'Courier New'; font-size: 9pt;"&gt;// Throw away the first two elements of this list;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000dd; font-family: 'Courier New'; font-size: 9pt;"&gt;remove from&lt;/SPAN&gt;&lt;SPAN style="color: black; font-size: 9pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;Sent_From&lt;/SPAN&gt;&lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 9pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt; &lt;STRONG&gt;{&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: teal; font-size: 9pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 9pt;"&gt;,&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN style="color: teal; font-family: 'Courier New'; font-size: 9pt;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;})&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 9pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000dd; font-family: 'Courier New'; font-size: 9pt;"&gt;show&lt;/SPAN&gt;&lt;SPAN style="color: black; font-size: 9pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;Sent_From&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 9pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: green; font-family: 'Courier New'; font-size: 9pt;"&gt;// Stack them up;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;dt3 &lt;/SPAN&gt;&lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 9pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt; dt2 &lt;/SPAN&gt;&lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 9pt;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt; Stack&lt;STRONG&gt;(&lt;/STRONG&gt;columns&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000dd; font-family: 'Courier New'; font-size: 9pt;"&gt;eval&lt;/SPAN&gt;&lt;SPAN style="color: black; font-size: 9pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;Sent_From&lt;STRONG&gt;))&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 9pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;Source Label Column&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;/SPAN&gt;&lt;SPAN style="color: purple; font-family: 'Courier New'; font-size: 9pt;"&gt;"Label"&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 9pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;Stacked Data Column&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;/SPAN&gt;&lt;SPAN style="color: purple; font-family: 'Courier New'; font-size: 9pt;"&gt;"Data"&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 9pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;dt3 &lt;/SPAN&gt;&lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 9pt;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt; set name&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: purple; font-family: 'Courier New'; font-size: 9pt;"&gt;"dt3"&lt;/SPAN&gt;&lt;SPAN style="color: black; font-size: 9pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 9pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: green; font-family: 'Courier New'; font-size: 9pt;"&gt;// dt3 now contains the number of letters sent from each person to each recipient;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;dt4 &lt;/SPAN&gt;&lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 9pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt; dt3 &lt;/SPAN&gt;&lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 9pt;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt; Summary&lt;STRONG&gt;( &lt;/STRONG&gt;Group&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;/SPAN&gt;&lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 9pt;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;From &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 9pt;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="color: #0000dd; font-family: 'Courier New'; font-size: 9pt;"&gt;Max&lt;/SPAN&gt;&lt;SPAN style="color: black; font-size: 9pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 9pt;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;Data &lt;STRONG&gt;)&lt;/STRONG&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 9pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;dt4 &lt;/SPAN&gt;&lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 9pt;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt; set name&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: purple; font-family: 'Courier New'; font-size: 9pt;"&gt;"dt4"&lt;/SPAN&gt;&lt;SPAN style="color: black; font-size: 9pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 9pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: green; font-family: 'Courier New'; font-size: 9pt;"&gt;// dt4 now contains the maximum number of letters sent from each person to any one recipient;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;dt5 &lt;/SPAN&gt;&lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 9pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt; dt4 &lt;/SPAN&gt;&lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 9pt;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt; Join&lt;STRONG&gt;( &lt;/STRONG&gt;With&lt;STRONG&gt;(&lt;/STRONG&gt; dt3 &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 9pt;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SelectWith&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 9pt;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;From&lt;/SPAN&gt;&lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 9pt;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 9pt;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;Label&lt;/SPAN&gt;&lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 9pt;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 9pt;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;Data &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 9pt;"&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; By Matching Columns&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;/SPAN&gt;&lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 9pt;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;From &lt;/SPAN&gt;&lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 9pt;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 9pt;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;From&lt;/SPAN&gt;&lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 9pt;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 9pt;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;Name&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;/SPAN&gt;&lt;SPAN style="color: purple; font-family: 'Courier New'; font-size: 9pt;"&gt;"Max(Data)"&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt; &lt;STRONG&gt;)&lt;/STRONG&gt; &lt;/SPAN&gt;&lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 9pt;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 9pt;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;Data &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 9pt;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Drop multiples&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;/SPAN&gt;&lt;SPAN style="color: teal; font-size: 9pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;0&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 9pt;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="color: teal; font-size: 9pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;0&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 9pt;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Name&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;SPAN style="color: purple; font-family: 'Courier New'; font-size: 9pt;"&gt;"Include non-matches"&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt; &lt;STRONG&gt;)(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: teal; font-size: 9pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;0&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 9pt;"&gt;,&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN style="color: teal; font-family: 'Courier New'; font-size: 9pt;"&gt;0&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;)&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 9pt;"&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Preserve main table order&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;/SPAN&gt;&lt;SPAN style="color: teal; font-size: 9pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 9pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;dt5 &lt;/SPAN&gt;&lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 9pt;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt; set name&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: purple; font-family: 'Courier New'; font-size: 9pt;"&gt;"dt5"&lt;/SPAN&gt;&lt;SPAN style="color: black; font-size: 9pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 9pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000dd; font-family: 'Courier New'; font-size: 9pt;"&gt;column&lt;/SPAN&gt;&lt;SPAN style="color: black; font-size: 9pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;dt5&lt;/SPAN&gt;&lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 9pt;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="color: purple; font-family: 'Courier New'; font-size: 9pt;"&gt;"Label"&lt;/SPAN&gt;&lt;SPAN style="color: black; font-size: 9pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 9pt;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt; set name&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: purple; font-family: 'Courier New'; font-size: 9pt;"&gt;"Recipient"&lt;/SPAN&gt;&lt;SPAN style="color: black; font-size: 9pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 9pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: green; font-family: 'Courier New'; font-size: 9pt;"&gt;/*&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: green; font-family: 'Courier New'; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: green; font-family: 'Courier New'; font-size: 9pt;"&gt;dt5 should now contain the maximum number of letters sent from each person to anyone recipient&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: green; font-family: 'Courier New'; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; and the name of that recipient (or recipients in the event of a tie)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: green; font-family: 'Courier New'; font-size: 9pt;"&gt;*/&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That should give you that Ann sent 4 letters to Michael, Jeff sent 7 letters to Michael, John sent 12 letters to Michael, Katherine sent 12 letters to John and so on.&amp;nbsp; Would you like to try that out and see if it does what you need?&amp;nbsp; To get the maximum number of letters received by any recipient from any one sender, just swap over the :To and :From columns.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 Mar 2014 17:54:27 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/finding-the-mode/m-p/8205#M8199</guid>
      <dc:creator />
      <dc:date>2014-03-09T17:54:27Z</dc:date>
    </item>
    <item>
      <title>Re: finding the mode</title>
      <link>https://community.jmp.com/t5/Discussions/finding-the-mode/m-p/8206#M8200</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Dodo,&lt;/P&gt;&lt;P&gt;it works fine.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 Mar 2014 19:31:00 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/finding-the-mode/m-p/8206#M8200</guid>
      <dc:creator>ron_horne</dc:creator>
      <dc:date>2014-03-09T19:31:00Z</dc:date>
    </item>
    <item>
      <title>Re: finding the mode</title>
      <link>https://community.jmp.com/t5/Discussions/finding-the-mode/m-p/8207#M8201</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Dodo and all,&lt;/P&gt;&lt;P&gt;Dodo's solution is technically correct but is not useful when dealing with big data.&lt;/P&gt;&lt;P&gt;thinking it over i have an alternative solution which is scalable.&lt;/P&gt;&lt;P&gt;dt1 = Open( "$SAMPLE_DATA/Mail Messages.jmp" );&lt;/P&gt;&lt;P&gt;dt1 &amp;lt;&amp;lt; set name( "dt1" );&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// produce a distribution of revcivers by senders&lt;/P&gt;&lt;P&gt;dt1 &amp;lt;&amp;lt; New Script( "Distribution", Distribution( Nominal Distribution( Column( :To ) ), By( :From ) ) );&lt;/P&gt;&lt;P&gt;Dist = Dt1 &amp;lt;&amp;lt; Run Script( "Distribution" );&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// extract the frequency tables as one data table.&lt;/P&gt;&lt;P&gt;dt2 = Report( dist[1] )["Frequencies"][Table Box( 1 )] &amp;lt;&amp;lt; Make Combined Data Table;&lt;/P&gt;&lt;P&gt;dt2 &amp;lt;&amp;lt; set name( "dt2" );&lt;/P&gt;&lt;P&gt;dist &amp;lt;&amp;lt; close window;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// remove the "Total" rows from the data table - they do not represent relevant Frequencies &lt;/P&gt;&lt;P&gt;selection = dt2 &amp;lt;&amp;lt; Select Where( :Level == "Total" );&lt;/P&gt;&lt;P&gt;selection &amp;lt;&amp;lt; Delete Rows;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// summarize to get the mode "To" for each "From"&lt;/P&gt;&lt;P&gt;dt3 = Data Table( "dt2" ) &amp;lt;&amp;lt; Summary( Group( :From ), Max( :Count ), statistics column name format( "column" ), Link to original data table( 0 ) );&lt;/P&gt;&lt;P&gt;dt3 &amp;lt;&amp;lt; Set Name( "Mode" );&lt;/P&gt;&lt;P&gt;// update the summary table to get the values of "To"&lt;/P&gt;&lt;P&gt;dt3 &amp;lt;&amp;lt; Update( With( Data Table( "dt2" ) ), Match Columns( :From = :From, :Count = :Count ), Add Columns from Update table( :Level ) );&lt;/P&gt;&lt;P&gt;dt2 &amp;lt;&amp;lt; close window;&lt;/P&gt;&lt;P&gt;Column( dt3, "Level" ) &amp;lt;&amp;lt; Set Name( "Mode" );&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Mar 2014 11:40:57 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/finding-the-mode/m-p/8207#M8201</guid>
      <dc:creator>ron_horne</dc:creator>
      <dc:date>2014-03-12T11:40:57Z</dc:date>
    </item>
    <item>
      <title>Re: finding the mode</title>
      <link>https://community.jmp.com/t5/Discussions/finding-the-mode/m-p/8208#M8202</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There are often several ways to perform a task in JMP. I just recalled a function I wrote some time ago that's quite efficient for finding the most common item grouped by one a or more columns. I share it here as an alternative to the above approaches. The result is similar to Dodo's, i.e. all "tied" modes are returned, not only the last as in Ron's approach using update().&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px;"&gt;mode_by_groups &lt;SPAN style="color: #160091;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #2800e1;"&gt;Function&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;STRONG&gt;{&lt;/STRONG&gt;collist&lt;STRONG&gt;}&lt;/STRONG&gt;&lt;SPAN style="color: #160091;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="color: #4c910b;"&gt;// list of column names&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; color: #4c910b;"&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp; &lt;/SPAN&gt;// Find mode of last column in collist&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&amp;nbsp; &lt;SPAN style="color: #2800e1;"&gt;Summarize&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; g &lt;SPAN style="color: #160091;"&gt;=&lt;/SPAN&gt; by&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;SPAN style="color: #2800e1;"&gt;Eval&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; collist &lt;STRONG&gt;)&lt;/STRONG&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #160091;"&gt;,&lt;/SPAN&gt; n &lt;SPAN style="color: #160091;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #2800e1;"&gt;Count&lt;/SPAN&gt;&lt;STRONG&gt;()&lt;/STRONG&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #160091;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&amp;nbsp; X &lt;SPAN style="color: #160091;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #2800e1;"&gt;Design&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; g&lt;STRONG&gt;[&lt;/STRONG&gt;&lt;SPAN style="color: #509092;"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;]&lt;/STRONG&gt; &lt;STRONG&gt;)&lt;/STRONG&gt; &lt;SPAN style="color: #160091;"&gt;:*&lt;/img&gt;&lt;/SPAN&gt; n&lt;SPAN style="color: #160091;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&amp;nbsp; i &lt;SPAN style="color: #160091;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #2800e1;"&gt;Loc&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;SPAN style="color: #2800e1;"&gt;V Max&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;SPAN style="color: #2800e1;"&gt;Transpose&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; X &lt;SPAN style="color: #160091;"&gt;==&lt;/SPAN&gt; &lt;SPAN style="color: #2800e1;"&gt;Repeat&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;SPAN style="color: #2800e1;"&gt;V Max&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; X &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #160091;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="color: #2800e1;"&gt;N Row&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; n &lt;STRONG&gt;)&lt;/STRONG&gt; &lt;STRONG&gt;)&lt;/STRONG&gt; &lt;STRONG&gt;)&lt;/STRONG&gt; &lt;STRONG&gt;)&lt;/STRONG&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #160091;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; color: #4c910b;"&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp; &lt;/SPAN&gt;//Add grouping columns to new table&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&amp;nbsp; dt1 &lt;SPAN style="color: #160091;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #2800e1;"&gt;New Table&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;SPAN style="color: #801392;"&gt;"modes"&lt;/SPAN&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #160091;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&amp;nbsp; &lt;SPAN style="color: #2800e1;"&gt;For&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; k &lt;SPAN style="color: #160091;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #509092;"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #160091;"&gt;,&lt;/SPAN&gt; k &lt;SPAN style="color: #160091;"&gt;&amp;lt;=&lt;/SPAN&gt; &lt;SPAN style="color: #2800e1;"&gt;N Items&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; collist &lt;STRONG&gt;)&lt;/STRONG&gt; &lt;SPAN style="color: #160091;"&gt;-&lt;/SPAN&gt; &lt;SPAN style="color: #509092;"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #160091;"&gt;,&lt;/SPAN&gt; k&lt;SPAN style="color: #160091;"&gt;++,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&amp;nbsp; dt1 &lt;SPAN style="color: #160091;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt; &lt;STRONG&gt;(&lt;/STRONG&gt;&lt;SPAN style="color: #160091;"&gt;&lt;STRONG&gt;New Column&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;SPAN style="color: #2800e1;"&gt;char&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;collist&lt;STRONG&gt;[&lt;/STRONG&gt;k&lt;STRONG&gt;])&lt;/STRONG&gt;&lt;SPAN style="color: #160091;"&gt;,&lt;/SPAN&gt; Character&lt;SPAN style="color: #160091;"&gt;,&lt;/SPAN&gt; set values&lt;STRONG&gt;(&lt;/STRONG&gt; g&lt;STRONG&gt;[&lt;/STRONG&gt;k&lt;STRONG&gt;][&lt;/STRONG&gt;i&lt;STRONG&gt;]&lt;/STRONG&gt; &lt;STRONG&gt;)&lt;/STRONG&gt; &lt;STRONG&gt;))&lt;/STRONG&gt;&lt;SPAN style="color: #160091;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&amp;nbsp; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #160091;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; color: #4c910b;"&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp; &lt;/SPAN&gt;//Add Mode and N&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&amp;nbsp; dt1 &lt;SPAN style="color: #160091;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt; &lt;SPAN style="color: #160091;"&gt;&lt;STRONG&gt;New Column&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;SPAN style="color: #801392;"&gt;"Mode of "&lt;/SPAN&gt; &lt;SPAN style="color: #160091;"&gt;||&lt;/SPAN&gt; &lt;SPAN style="color: #2800e1;"&gt;char&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;collist&lt;STRONG&gt;[&lt;/STRONG&gt;k&lt;STRONG&gt;])&lt;/STRONG&gt;&lt;SPAN style="color: #160091;"&gt;,&lt;/SPAN&gt; Character&lt;SPAN style="color: #160091;"&gt;,&lt;/SPAN&gt; set values&lt;STRONG&gt;(&lt;/STRONG&gt; g&lt;STRONG&gt;[&lt;/STRONG&gt;k&lt;STRONG&gt;][&lt;/STRONG&gt;i&lt;STRONG&gt;]&lt;/STRONG&gt; &lt;STRONG&gt;)&lt;/STRONG&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #160091;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&amp;nbsp; dt1 &lt;SPAN style="color: #160091;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt; &lt;SPAN style="color: #160091;"&gt;&lt;STRONG&gt;New Column&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;SPAN style="color: #801392;"&gt;"N"&lt;/SPAN&gt;&lt;SPAN style="color: #160091;"&gt;,&lt;/SPAN&gt; set values&lt;STRONG&gt;(&lt;/STRONG&gt; n&lt;STRONG&gt;[&lt;/STRONG&gt;i&lt;STRONG&gt;]&lt;/STRONG&gt; &lt;STRONG&gt;)&lt;/STRONG&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #160091;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #160091;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; color: #4c910b;"&gt;//Examples&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; color: #801392;"&gt;&lt;SPAN style="color: #2800e1;"&gt;Open&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;/SPAN&gt;"$SAMPLE_DATA/Mail Messages.jmp"&lt;SPAN style="color: #000000;"&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #160091;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px;"&gt;mode_by_groups&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;STRONG&gt;{&lt;/STRONG&gt;From&lt;SPAN style="color: #160091;"&gt;,&lt;/SPAN&gt; To&lt;STRONG&gt;}&lt;/STRONG&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #160091;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; color: #801392;"&gt;&lt;SPAN style="color: #2800e1;"&gt;Open&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;/SPAN&gt;"$SAMPLE_DATA/Consumer Preferences.jmp"&lt;SPAN style="color: #000000;"&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #160091;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px;"&gt;mode_by_groups&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;STRONG&gt;{&lt;/STRONG&gt;Gender&lt;SPAN style="color: #160091;"&gt;,&lt;/SPAN&gt; Single Status&lt;SPAN style="color: #160091;"&gt;,&lt;/SPAN&gt; Birth Year&lt;STRONG&gt;}&lt;/STRONG&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #160091;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Mar 2014 15:34:10 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/finding-the-mode/m-p/8208#M8202</guid>
      <dc:creator>ms</dc:creator>
      <dc:date>2014-03-12T15:34:10Z</dc:date>
    </item>
    <item>
      <title>Re: finding the mode</title>
      <link>https://community.jmp.com/t5/Discussions/finding-the-mode/m-p/8209#M8203</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much.&lt;/P&gt;&lt;P&gt;dealing with the mode i came across two issues that look like faults of the JMP program.&lt;/P&gt;&lt;P&gt;1. if there is only one observation the distribution platform does not provide a mode at all. Furthermore, in case of tied frequency of 1 nothing is returned either. this means that the definition in the help file is incorrect when it clams to bring the lower value among the most frequent. &lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="5682_Untitled2.png" style="width: 341px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/318i83859E9B92404A4C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="5682_Untitled2.png" alt="5682_Untitled2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. when producing a Frequencies table for the column width is long (i.e. 12) making a data table does not allow for recovering the whole number. for some reason it produces a text string of the abbreviated number.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="5680_Untitled.png" style="width: 532px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/319i1E6A374FDD27BBE0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="5680_Untitled.png" alt="5680_Untitled.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Oct 2016 20:35:03 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/finding-the-mode/m-p/8209#M8203</guid>
      <dc:creator>ron_horne</dc:creator>
      <dc:date>2016-10-18T20:35:03Z</dc:date>
    </item>
    <item>
      <title>Re: finding the mode</title>
      <link>https://community.jmp.com/t5/Discussions/finding-the-mode/m-p/8210#M8204</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure if this is helpful but on the JMP File Exchange Brady Brady has posted an add-in that gives extended summary statistics capability including the Mode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/demosdownloads/downarea_t4.jsp?productID=111731&amp;amp;jmpflag=Y" title="http://support.sas.com/demosdownloads/downarea_t4.jsp?productID=111731&amp;amp;jmpflag=Y" rel="noopener noreferrer" target="_blank"&gt;http://support.sas.com/demosdownloads/downarea_t4.jsp?productID=111731&amp;amp;jmpflag=Y&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="5688_Screen Shot 2014-03-12 at 3.30.34 PM.png" style="width: 742px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/320i87DC9F097B635D5B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="5688_Screen Shot 2014-03-12 at 3.30.34 PM.png" alt="5688_Screen Shot 2014-03-12 at 3.30.34 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Oct 2016 20:35:13 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/finding-the-mode/m-p/8210#M8204</guid>
      <dc:creator>louv</dc:creator>
      <dc:date>2016-10-18T20:35:13Z</dc:date>
    </item>
    <item>
      <title>Re: finding the mode</title>
      <link>https://community.jmp.com/t5/Discussions/finding-the-mode/m-p/8211#M8205</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you LouV&lt;/P&gt;&lt;P&gt;this is defiantly useful yet not perfect. &lt;/P&gt;&lt;P&gt;Brady's Add-in is only accessible by the GUI and not by script - if it is please let me know.&lt;/P&gt;&lt;P&gt;the N Rows column that shows up is the number of occurrences in each Group and not the frequency of the mode itself. further more i didn't see built in option to get that frequency - if there is please let me know.&lt;/P&gt;&lt;P&gt;otherwise it is powerful and scalable. Brady's add-in aught to be part of the program and not a patch.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Mar 2014 19:16:39 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/finding-the-mode/m-p/8211#M8205</guid>
      <dc:creator>ron_horne</dc:creator>
      <dc:date>2014-03-13T19:16:39Z</dc:date>
    </item>
    <item>
      <title>Re: finding the mode</title>
      <link>https://community.jmp.com/t5/Discussions/finding-the-mode/m-p/8212#M8206</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much MS. it is very useful.&lt;/P&gt;&lt;P&gt;This way is actually more "honest" than other alternatives mentioned in this discussion since it also assesses the frequency of missing data. for example, running the following script returns some missing values as the mode.&lt;/P&gt;&lt;P&gt;dt = open ("$SAMPLE_DATA\Cars.jmp");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;mode_by_groups = Function( {collist}, // list of column names&lt;/P&gt;&lt;P&gt;&amp;nbsp; // Find mode of last column in collist&lt;/P&gt;&lt;P&gt;&amp;nbsp; Summarize( g = by( Eval( collist ) ), n = Count() );&lt;/P&gt;&lt;P&gt;&amp;nbsp; X = Design( g[1] ) :*&lt;/img&gt; n;&lt;/P&gt;&lt;P&gt;&amp;nbsp; i = Loc( V Max( Transpose( X == Repeat( V Max( X ), N Row( n ) ) ) ) );&lt;/P&gt;&lt;P&gt;&amp;nbsp; //Add grouping columns to new table&lt;/P&gt;&lt;P&gt;&amp;nbsp; dt11 = New Table( "modes" );&lt;/P&gt;&lt;P&gt;&amp;nbsp; For( k = 1, k &amp;lt;= N Items( collist ) - 1, k++,&lt;/P&gt;&lt;P&gt;&amp;nbsp; dt11 &amp;lt;&amp;lt; (New Column( char(collist&lt;K&gt;), Character, set values( g&lt;K&gt;&lt;I&gt; ) ));&lt;/I&gt;&lt;/K&gt;&lt;/K&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; );&lt;/P&gt;&lt;P&gt;&amp;nbsp; //Add Mode and N&lt;/P&gt;&lt;P&gt;&amp;nbsp; dt11 &amp;lt;&amp;lt; New Column( "Mode of " || char(collist&lt;K&gt;), Character, set values( g&lt;K&gt;&lt;I&gt; ) );&lt;/I&gt;&lt;/K&gt;&lt;/K&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; dt11 &amp;lt;&amp;lt; New Column( "N", set values( n&lt;I&gt; ) );&lt;/I&gt;&lt;/P&gt;&lt;P&gt;);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;mode_by_groups( {Make , R Leg } );&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="5711_Untitled.png" style="width: 759px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/321i28037638F8FD2789/image-size/medium?v=v2&amp;amp;px=400" role="button" title="5711_Untitled.png" alt="5711_Untitled.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Oct 2016 20:35:24 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/finding-the-mode/m-p/8212#M8206</guid>
      <dc:creator>ron_horne</dc:creator>
      <dc:date>2016-10-18T20:35:24Z</dc:date>
    </item>
    <item>
      <title>Re: finding the mode</title>
      <link>https://community.jmp.com/t5/Discussions/finding-the-mode/m-p/8213#M8207</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I believe that this will also produce the intended result:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;dt = open ("$SAMPLE_DATA\Cars.jmp");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;dt2 = dt &amp;lt;&amp;lt; summary(group(:Make, :R Leg));&lt;/P&gt;&lt;P&gt;dt2 &amp;lt;&amp;lt; selectwhere(colmaximum(:n rows, :make) != :n rows) &amp;lt;&amp;lt; Delete Rows;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Brady&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Mar 2014 23:13:31 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/finding-the-mode/m-p/8213#M8207</guid>
      <dc:creator>brady_brady</dc:creator>
      <dc:date>2014-03-13T23:13:31Z</dc:date>
    </item>
    <item>
      <title>Re: finding the mode</title>
      <link>https://community.jmp.com/t5/Discussions/finding-the-mode/m-p/8214#M8208</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ron,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I believe that the reason JMP reports no mode when a) only one observation exists and 2) when all observations occur only once is that each of these is consistent with the way the mode is defined in many textbooks. i.e., if no element appears more than once, no mode exists.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Brady&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Mar 2014 23:20:25 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/finding-the-mode/m-p/8214#M8208</guid>
      <dc:creator>brady_brady</dc:creator>
      <dc:date>2014-03-13T23:20:25Z</dc:date>
    </item>
    <item>
      <title>Re: finding the mode</title>
      <link>https://community.jmp.com/t5/Discussions/finding-the-mode/m-p/8215#M8209</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Brady,&lt;/P&gt;&lt;P&gt;This is by far the most parsimonious and robust script.&lt;/P&gt;&lt;P&gt;I would like to add one optional line of code to disable the possibility of missing values as the mode:&lt;/P&gt;&lt;P&gt;dt = open ("$SAMPLE_DATA\Cars.jmp");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;dt2 = dt &amp;lt;&amp;lt; summary(group(:Make, :R Leg));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// option to disable the possibility of missing values as modes&lt;/P&gt;&lt;P&gt;dt2 &amp;lt;&amp;lt; Select Where ( IsMissing (:R Leg)) &amp;lt;&amp;lt; Delete Rows;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;dt2 &amp;lt;&amp;lt; selectwhere(colmaximum(:n rows, :make) != :n rows) &amp;lt;&amp;lt; Delete Rows;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Mar 2014 01:48:44 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/finding-the-mode/m-p/8215#M8209</guid>
      <dc:creator>ron_horne</dc:creator>
      <dc:date>2014-03-14T01:48:44Z</dc:date>
    </item>
  </channel>
</rss>

