<?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 X range that will include a certain portion of the Y in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Finding-the-X-range-that-will-include-a-certain-portion-of-the-Y/m-p/225482#M44775</link>
    <description>&lt;P&gt;You could try including histogram borders and highlighting the section of the Y distribution - the X values should be highlighted.&amp;nbsp; Then, if you want to examine these, you can name that selection in a column of the data set (e.g., points of interest) for further analysis.&lt;/P&gt;</description>
    <pubDate>Wed, 11 Sep 2019 23:51:03 GMT</pubDate>
    <dc:creator>dale_lehman</dc:creator>
    <dc:date>2019-09-11T23:51:03Z</dc:date>
    <item>
      <title>Finding the X range that will include a certain portion of the Y</title>
      <link>https://community.jmp.com/t5/Discussions/Finding-the-X-range-that-will-include-a-certain-portion-of-the-Y/m-p/225474#M44774</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My problem is probably very simple but I just don't seem to be able to figure it out.&lt;/P&gt;
&lt;P&gt;I have a column Y that I have plotted it vs column X and it looks something like the attached image.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to find the range in X where it yields (or includes) 60% of Y points. There is no defind formula that relates the 2 columns.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any ideas?&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Fit Y by X.jpg" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/19280i5CBE87A114D09FAF/image-size/large?v=v2&amp;amp;px=999" role="button" title="Fit Y by X.jpg" alt="Fit Y by X.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Sep 2019 11:55:33 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Finding-the-X-range-that-will-include-a-certain-portion-of-the-Y/m-p/225474#M44774</guid>
      <dc:creator>NSadeghi</dc:creator>
      <dc:date>2019-09-16T11:55:33Z</dc:date>
    </item>
    <item>
      <title>Re: Finding the X range that will include a certain portion of the Y</title>
      <link>https://community.jmp.com/t5/Discussions/Finding-the-X-range-that-will-include-a-certain-portion-of-the-Y/m-p/225482#M44775</link>
      <description>&lt;P&gt;You could try including histogram borders and highlighting the section of the Y distribution - the X values should be highlighted.&amp;nbsp; Then, if you want to examine these, you can name that selection in a column of the data set (e.g., points of interest) for further analysis.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Sep 2019 23:51:03 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Finding-the-X-range-that-will-include-a-certain-portion-of-the-Y/m-p/225482#M44775</guid>
      <dc:creator>dale_lehman</dc:creator>
      <dc:date>2019-09-11T23:51:03Z</dc:date>
    </item>
    <item>
      <title>Re: Finding the X range that will include a certain portion of the Y</title>
      <link>https://community.jmp.com/t5/Discussions/Finding-the-X-range-that-will-include-a-certain-portion-of-the-Y/m-p/225519#M44781</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/15961"&gt;@NSadeghi&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;please have a look at this script and let us know if it is useful.&lt;/P&gt;
&lt;P&gt;perhaps someone else has a more elegant way of doing this. i would also like to know&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 you want 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( :height ), Order( Ascending ), replace table );

// here is where we define the share of included range (0.6)
difcol = New Column("dif", Numeric, "Continuous", Format("Best", 12), Formula(Abs(:height - Lag(:height, -(N Rows() * 0.6)))));
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.6)
end = start + nrows(dt)*0.6 -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  ));

// make graphs for observations in the range only.
Bivariate( Y( :height ), X( :weight ), Where( :inrange == 1 ) );

Graph Builder(
	Size( 542, 448 ),
	Show Control Panel( 0 ),
	Variables( X( :weight ), Y( :height ) ), Where( :inrange == 1 ),
	Elements( Points( X, Y, Legend( 3 ) ), Smoother( X, Y, Legend( 4 ) ) )
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 12 Sep 2019 10:54:09 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Finding-the-X-range-that-will-include-a-certain-portion-of-the-Y/m-p/225519#M44781</guid>
      <dc:creator>ron_horne</dc:creator>
      <dc:date>2019-09-12T10:54:09Z</dc:date>
    </item>
    <item>
      <title>Re: Finding the X range that will include a certain portion of the Y</title>
      <link>https://community.jmp.com/t5/Discussions/Finding-the-X-range-that-will-include-a-certain-portion-of-the-Y/m-p/225520#M44782</link>
      <description>&lt;P&gt;You find, select, and subset the rows containing the (middle) 60% of the Y values, and then examine the distribution of the associated X values.&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 1 = Open( "$SAMPLE_DATA/Big Class.jmp" );

biv = dt 1 &amp;lt;&amp;lt; Bivariate( Y( :weight ), X( :height ) );

lo = Col Quantile( :weight, 0.2 );
hi = Col Quantile( :weight, 0.8 );

dt 1 &amp;lt;&amp;lt; Select Where( lo &amp;lt;= :weight &amp;lt;= hi );

dt 2 = dt 1 &amp;lt;&amp;lt; Subset(
	Selected Rows( 1 ),
	Selected columns only( 0 )
);

dist = dt 2 &amp;lt;&amp;lt; Distribution( Y( :height ) );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 12 Sep 2019 10:55:45 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Finding-the-X-range-that-will-include-a-certain-portion-of-the-Y/m-p/225520#M44782</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2019-09-12T10:55:45Z</dc:date>
    </item>
  </channel>
</rss>

