<?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: Select middle 90% range using quantiles in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Select-middle-90-range-using-quantiles/m-p/356304#M60625</link>
    <description>&lt;P&gt;I believe this will give you what you want;&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; select where(
	:HEIGHT &amp;lt; Col Quantile( :Height, .05 ) | 
	:HEIGHT &amp;gt; Col Quantile( :Height, .95 )
);
dt &amp;lt;&amp;lt; exclude;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Or if you need to have your above and below row number matrices, then this will work&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/big class.jmp" );

RowsBelow5PCTL = dt &amp;lt;&amp;lt; get rows where( :HEIGHT &amp;lt; Col Quantile( :HEIGHT, .05 ) );

dt &amp;lt;&amp;lt; select rows(RowsBelow5PCTL);

RowsAbove95PCTL = dt &amp;lt;&amp;lt; get rows where( :HEIGHT &amp;gt; Col Quantile( :HEIGHT, .95 ) );
dt &amp;lt;&amp;lt; select rows(RowsAbove95PCTL);

dt &amp;lt;&amp;lt; exclude;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 05 Feb 2021 04:44:42 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2021-02-05T04:44:42Z</dc:date>
    <item>
      <title>Select middle 90% range using quantiles</title>
      <link>https://community.jmp.com/t5/Discussions/Select-middle-90-range-using-quantiles/m-p/356301#M60624</link>
      <description>&lt;P&gt;I have a Numeric Continuous column labeled as Height with several hundred height values. I want to exclude outliers by just using the middle 90% range of data. I am trying to script it in JSL by selecting all rows below 5% quantile and above 95% quantile and then exclude them. But I am not able to make it work by using script below. I will appreciate any guidance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;RowsBelow5PCTL = dt &amp;lt;&amp;lt; get rows where( :HEIGHT &amp;lt; Col Quantile( :HEIGHT, .05 ) );

RowsAbove95PCTL = dt &amp;lt;&amp;lt; get rows where( :HEIGHT &amp;gt; Col Quantile( :HEIGHT, .95 ) );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 09 Jun 2023 22:05:14 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Select-middle-90-range-using-quantiles/m-p/356301#M60624</guid>
      <dc:creator>rverma</dc:creator>
      <dc:date>2023-06-09T22:05:14Z</dc:date>
    </item>
    <item>
      <title>Re: Select middle 90% range using quantiles</title>
      <link>https://community.jmp.com/t5/Discussions/Select-middle-90-range-using-quantiles/m-p/356304#M60625</link>
      <description>&lt;P&gt;I believe this will give you what you want;&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; select where(
	:HEIGHT &amp;lt; Col Quantile( :Height, .05 ) | 
	:HEIGHT &amp;gt; Col Quantile( :Height, .95 )
);
dt &amp;lt;&amp;lt; exclude;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Or if you need to have your above and below row number matrices, then this will work&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/big class.jmp" );

RowsBelow5PCTL = dt &amp;lt;&amp;lt; get rows where( :HEIGHT &amp;lt; Col Quantile( :HEIGHT, .05 ) );

dt &amp;lt;&amp;lt; select rows(RowsBelow5PCTL);

RowsAbove95PCTL = dt &amp;lt;&amp;lt; get rows where( :HEIGHT &amp;gt; Col Quantile( :HEIGHT, .95 ) );
dt &amp;lt;&amp;lt; select rows(RowsAbove95PCTL);

dt &amp;lt;&amp;lt; exclude;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 05 Feb 2021 04:44:42 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Select-middle-90-range-using-quantiles/m-p/356304#M60625</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2021-02-05T04:44:42Z</dc:date>
    </item>
    <item>
      <title>Re: Select middle 90% range using quantiles</title>
      <link>https://community.jmp.com/t5/Discussions/Select-middle-90-range-using-quantiles/m-p/356554#M60648</link>
      <description>Thank you very much.</description>
      <pubDate>Fri, 05 Feb 2021 19:09:20 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Select-middle-90-range-using-quantiles/m-p/356554#M60648</guid>
      <dc:creator>rverma</dc:creator>
      <dc:date>2021-02-05T19:09:20Z</dc:date>
    </item>
  </channel>
</rss>

