<?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: Getting Values for shortest half range in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Getting-Values-for-shortest-half-range/m-p/29512#M19473</link>
    <description>&lt;P&gt;This isn't really an answer, but maybe useful in some cases. If you just wanted to see the shortest half values, you could save as Interactive HTML and hover over the red bracket.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Interactive HTML Box Plot Shortest Half Values" style="width: 447px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/4115iCE0221902363AEDA/image-size/large?v=v2&amp;amp;px=999" role="button" title="ShortestHalfTip.PNG" alt="Interactive HTML Box Plot Shortest Half Values" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Interactive HTML Box Plot Shortest Half Values&lt;/span&gt;&lt;/span&gt;﻿&lt;/P&gt;
&lt;P&gt;When viewing in a mobile browser, just tap the red bracket.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 23 Nov 2016 14:12:51 GMT</pubDate>
    <dc:creator>John_Powell_JMP</dc:creator>
    <dc:date>2016-11-23T14:12:51Z</dc:date>
    <item>
      <title>Getting Values for shortest half range</title>
      <link>https://community.jmp.com/t5/Discussions/Getting-Values-for-shortest-half-range/m-p/29489#M19463</link>
      <description>&lt;P&gt;Is there a way to get the actual values from the shortest half vis in the outlier box plot?&lt;/P&gt;</description>
      <pubDate>Tue, 22 Nov 2016 20:08:12 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Getting-Values-for-shortest-half-range/m-p/29489#M19463</guid>
      <dc:creator>vince_faller</dc:creator>
      <dc:date>2016-11-22T20:08:12Z</dc:date>
    </item>
    <item>
      <title>Re: Getting Values for shortest half range</title>
      <link>https://community.jmp.com/t5/Discussions/Getting-Values-for-shortest-half-range/m-p/29496#M19464</link>
      <description>I don't see anyway to retrieve such information.  I tried a real simpleton method of looking at the ranges of 50% of the data from lowest to highest, to see if that would match up, but it failed.  It would be a nice enhancement, to be able to "&amp;lt;&amp;lt; get shorterhalf values".&lt;BR /&gt;&lt;BR /&gt;I would pass it on to support@jmp.com</description>
      <pubDate>Tue, 22 Nov 2016 21:44:00 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Getting-Values-for-shortest-half-range/m-p/29496#M19464</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2016-11-22T21:44:00Z</dc:date>
    </item>
    <item>
      <title>Re: Getting Values for shortest half range</title>
      <link>https://community.jmp.com/t5/Discussions/Getting-Values-for-shortest-half-range/m-p/29503#M19470</link>
      <description>&lt;P&gt;Yes, but it is not particularly easy.&amp;nbsp; These values present themselves as the last two numbers in the adjacents portion of the journal.&amp;nbsp; First you need to get the journal for a box plot.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt=Open("$SAMPLE_DATA/Big Class.jmp");
obj=dt&amp;lt;&amp;lt;Distribution(Y(:height));
rpt=obj&amp;lt;&amp;lt;report;
jrn=rpt[FrameBox(2)]&amp;lt;&amp;lt;get journal;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Next, you will have to parse jrn for adjacents.&amp;nbsp; Perhaps someone with more JSL experience can help you with that if you do not already know how to do that.&amp;nbsp; I'm not familiar with the ins and outs of parsing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Nov 2016 13:19:46 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Getting-Values-for-shortest-half-range/m-p/29503#M19470</guid>
      <dc:creator>tonya_mauldin</dc:creator>
      <dc:date>2016-11-23T13:19:46Z</dc:date>
    </item>
    <item>
      <title>Re: Getting Values for shortest half range</title>
      <link>https://community.jmp.com/t5/Discussions/Getting-Values-for-shortest-half-range/m-p/29504#M19471</link>
      <description>&lt;P&gt;Tonya's solution is clever and right to the point. The rest of the script is actually not that bad. The variable jrn contains a string representation of the Distriution platform (not just the Outlier Box Plot). So let's use string functions to suss out the desired ends of the red bracket. We find argument with&amp;nbsp;Contains() and we extract the bits with a succession of&amp;nbsp;calls to Word():&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Open( "$SAMPLE_DATA/Big Class.jmp" );

dist = dt &amp;lt;&amp;lt; Distribution( Y( :weight ) );

rpt = dist &amp;lt;&amp;lt; Report;

jrn = rpt[FrameBox(2)] &amp;lt;&amp;lt; Get Journal;

pos = Contains( Upper Case( jrn ), "ADJACENTS" );

adj = Word( 2, Sub Str( jrn, pos ), "()" );

lo = Num( Word( 3, adj, "," ) );
hi = Num( Word( 4, adj, "," ) );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 23 Nov 2016 13:20:37 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Getting-Values-for-shortest-half-range/m-p/29504#M19471</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2016-11-23T13:20:37Z</dc:date>
    </item>
    <item>
      <title>Re: Getting Values for shortest half range</title>
      <link>https://community.jmp.com/t5/Discussions/Getting-Values-for-shortest-half-range/m-p/29508#M19472</link>
      <description>&lt;P&gt;Thanks for finishing my script, Mark!&amp;nbsp; I've never been the&amp;nbsp;most efficient with&amp;nbsp;the character functions.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Nov 2016 13:55:52 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Getting-Values-for-shortest-half-range/m-p/29508#M19472</guid>
      <dc:creator>tonya_mauldin</dc:creator>
      <dc:date>2016-11-23T13:55:52Z</dc:date>
    </item>
    <item>
      <title>Re: Getting Values for shortest half range</title>
      <link>https://community.jmp.com/t5/Discussions/Getting-Values-for-shortest-half-range/m-p/29512#M19473</link>
      <description>&lt;P&gt;This isn't really an answer, but maybe useful in some cases. If you just wanted to see the shortest half values, you could save as Interactive HTML and hover over the red bracket.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Interactive HTML Box Plot Shortest Half Values" style="width: 447px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/4115iCE0221902363AEDA/image-size/large?v=v2&amp;amp;px=999" role="button" title="ShortestHalfTip.PNG" alt="Interactive HTML Box Plot Shortest Half Values" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Interactive HTML Box Plot Shortest Half Values&lt;/span&gt;&lt;/span&gt;﻿&lt;/P&gt;
&lt;P&gt;When viewing in a mobile browser, just tap the red bracket.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Nov 2016 14:12:51 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Getting-Values-for-shortest-half-range/m-p/29512#M19473</guid>
      <dc:creator>John_Powell_JMP</dc:creator>
      <dc:date>2016-11-23T14:12:51Z</dc:date>
    </item>
    <item>
      <title>Re: Getting Values for shortest half range</title>
      <link>https://community.jmp.com/t5/Discussions/Getting-Values-for-shortest-half-range/m-p/29543#M19496</link>
      <description>&lt;P&gt;Thanks for sharing the&amp;nbsp;&lt;EM&gt;&amp;lt;&amp;lt;Get Journal&lt;/EM&gt;&amp;nbsp;idea. Really clever and new to me.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's an attempt to get the limits by raw calculation. In my limited testing it compares well with the Journal numbers. It seems to handle missing values and ties as expected (but I may have missed something).&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;// Function for calculating the lower and upper limits of
// Shortest Half Range of a numeric column.

shorth = Function({col}, {M, n, d, i = 0},
    M = col &amp;lt;&amp;lt; get values;
    M = Sort Ascending(M[Loc Nonmissing(M)]);
    n = N Row(M) / 2 + Mod(N Row(M), 2);
    d = Loc Min(J(1, n, M[(i++) + n] - M[i]));
    lo = M[d];
    hi = M[d + n - 1];
);

// Test
dt = Open("$SAMPLE_DATA/Big Class.jmp");
shorth(Column(dt, "weight"));
Show(lo, hi);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Nov 2016 00:53:52 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Getting-Values-for-shortest-half-range/m-p/29543#M19496</guid>
      <dc:creator>ms</dc:creator>
      <dc:date>2016-11-24T00:53:52Z</dc:date>
    </item>
    <item>
      <title>Re: Getting Values for shortest half range</title>
      <link>https://community.jmp.com/t5/Discussions/Getting-Values-for-shortest-half-range/m-p/30794#M19537</link>
      <description>&lt;P&gt;Hi Tonya,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any reason you could think of that I'd get a value of&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;adjacents&lt;/SPAN&gt;(0,0,0,0)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It's definitely not 0-0 as the shortest range. &amp;nbsp;Sorry but I can't post the actual data. &amp;nbsp;I'll see if I'm allowed to anonymize it. &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Nov 2016 17:32:06 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Getting-Values-for-shortest-half-range/m-p/30794#M19537</guid>
      <dc:creator>vince_faller</dc:creator>
      <dc:date>2016-11-28T17:32:06Z</dc:date>
    </item>
    <item>
      <title>Re: Getting Values for shortest half range</title>
      <link>https://community.jmp.com/t5/Discussions/Getting-Values-for-shortest-half-range/m-p/30799#M19540</link>
      <description>&lt;P&gt;Hi Tonya,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any reason you could think of that I'd get a value of&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;adjacents&lt;/SPAN&gt;(0,0,0,0)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It's definitely not 0-0 as the shortest range. &amp;nbsp;Sorry but I can't post the actual data. &amp;nbsp;I'll see if I'm allowed to anonymize it. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;*Edit* Nevermind. &amp;nbsp;For some reason my adjacents went to Framebox(1) and all the framebox(2) &amp;nbsp;were 0s. &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Nov 2016 17:52:07 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Getting-Values-for-shortest-half-range/m-p/30799#M19540</guid>
      <dc:creator>vince_faller</dc:creator>
      <dc:date>2016-11-28T17:52:07Z</dc:date>
    </item>
    <item>
      <title>Re: Getting Values for shortest half range</title>
      <link>https://community.jmp.com/t5/Discussions/Getting-Values-for-shortest-half-range/m-p/225521#M44783</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2610"&gt;@vince_faller&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;a broader version of this question was asked later &lt;A href="https://community.jmp.com/t5/Discussions/Finding-the-X-range-that-will-include-a-certain-portion-of-the-Y/td-p/225474/jump-to/first-unread-message" target="_blank" rel="noopener"&gt;https://community.jmp.com/t5/Discussions/Finding-the-X-range-that-will-include-a-certain-portion-of-the-Y/td-p/225474/jump-to/first-unread-message&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;my solution is as follows. could anyone chack if it is robust? thank you.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );

dt = Open( "$SAMPLE_DATA/Big Class.jmp" );

// this is just in case wewant to bring the data back to original row order later.
rowcol = New Column("Row", Numeric, "Continuous", Format("Best", 12), Formula(Row()));
dt &amp;lt;&amp;lt; run formulas();
rowcol &amp;lt;&amp;lt; suppress eval( true );

// now we start working
dt &amp;lt;&amp;lt; Sort( By( :weight ), Order( Ascending ), replace table );

// here is where we define the share of included range (0.5)
difcol = New Column("dif", Numeric, "Continuous", Format("Best", 12), Formula(Abs(:weight - Lag(:weight, -(N Rows() * 0.5)))));
dt &amp;lt;&amp;lt; run formulas();
difcol &amp;lt;&amp;lt; suppress eval( true );

start  = (dt&amp;lt;&amp;lt;get rows where(Col minimum (:dif)==:dif))[1];
// here we also mantion the share of included range (0.5)
end = start + nrows(dt)*0.5 -1;

// new binary column for in or out the range
dt &amp;lt;&amp;lt; New Column("inrange", Numeric, "Ordinal");
for each row (:inrange = if (and (row() &amp;gt;= start, row()&amp;lt;=end),1 ,0  ));&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 12 Sep 2019 11:05:45 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Getting-Values-for-shortest-half-range/m-p/225521#M44783</guid>
      <dc:creator>ron_horne</dc:creator>
      <dc:date>2019-09-12T11:05:45Z</dc:date>
    </item>
  </channel>
</rss>

