<?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 empirical median in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Calculate-empirical-median/m-p/618646#M81798</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/15287"&gt;@Feli&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think the function "Col Median()" might be useful in your case, as the scripting index mentions that "the ordering is cached internally so that multiple evaluations will be efficient". You can also specify a "By" group variable.&lt;BR /&gt;Example on the Big class dataset from the scripting index (menu Help, Scripting Index), with a formula for median height calculated for each Age group:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt &amp;lt;&amp;lt; New Column( "Col Median Height by Age",
	numeric,
	continuous,
	formula( Col Median( :height, :age ) )
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I hope this answer will help you,&lt;/P&gt;</description>
    <pubDate>Fri, 31 Mar 2023 13:53:38 GMT</pubDate>
    <dc:creator>Victor_G</dc:creator>
    <dc:date>2023-03-31T13:53:38Z</dc:date>
    <item>
      <title>Calculate empirical median</title>
      <link>https://community.jmp.com/t5/Discussions/Calculate-empirical-median/m-p/618631#M81796</link>
      <description>&lt;P&gt;There are two definitions of the median: one as the 0.5 quantile of a (probability) distribution, the other as the "middle element" of a finite list (&amp;nbsp;&lt;A href="https://en.wikipedia.org/wiki/Median" target="_self"&gt;Wikipedia median&lt;/A&gt;&amp;nbsp;).&lt;/P&gt;&lt;P&gt;I know how to calculate the former, but does anybody know a JMP function or elegant, fast way to calculate the latter for implementing in a rolling median in a formula column?&lt;/P&gt;&lt;P&gt;Creating a small list, sorting this, getting the middle value ... does not appear to be efficient to do for every row in a long table&lt;/P&gt;</description>
      <pubDate>Sat, 10 Jun 2023 23:59:44 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Calculate-empirical-median/m-p/618631#M81796</guid>
      <dc:creator>Feli</dc:creator>
      <dc:date>2023-06-10T23:59:44Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate empirical median</title>
      <link>https://community.jmp.com/t5/Discussions/Calculate-empirical-median/m-p/618646#M81798</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/15287"&gt;@Feli&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think the function "Col Median()" might be useful in your case, as the scripting index mentions that "the ordering is cached internally so that multiple evaluations will be efficient". You can also specify a "By" group variable.&lt;BR /&gt;Example on the Big class dataset from the scripting index (menu Help, Scripting Index), with a formula for median height calculated for each Age group:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt &amp;lt;&amp;lt; New Column( "Col Median Height by Age",
	numeric,
	continuous,
	formula( Col Median( :height, :age ) )
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I hope this answer will help you,&lt;/P&gt;</description>
      <pubDate>Fri, 31 Mar 2023 13:53:38 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Calculate-empirical-median/m-p/618646#M81798</guid>
      <dc:creator>Victor_G</dc:creator>
      <dc:date>2023-03-31T13:53:38Z</dc:date>
    </item>
  </channel>
</rss>

