<?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: JSL for evaluating tolerance interval USL and LSL after calculation in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/JSL-for-evaluating-tolerance-interval-USL-and-LSL-after/m-p/68515#M34861</link>
    <description>&lt;P&gt;No I want to use the tolerance limits as spec limits.&lt;/P&gt;</description>
    <pubDate>Fri, 17 Aug 2018 09:52:52 GMT</pubDate>
    <dc:creator>DannyORegan94</dc:creator>
    <dc:date>2018-08-17T09:52:52Z</dc:date>
    <item>
      <title>JSL for evaluating tolerance interval USL and LSL after calculation</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-for-evaluating-tolerance-interval-USL-and-LSL-after/m-p/68511#M34857</link>
      <description>&lt;P&gt;&amp;nbsp;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I want to write a script that will calculate a tolerance interval with 99% coverage, alpha = 0.95, on a column of data.&lt;/P&gt;&lt;P&gt;Once it has done this I want to access/evaluate the USL and LSL to be used for hiding/excluding values that fall outside those limits.&lt;/P&gt;&lt;P&gt;The reason I am doing this is I have two columns of data that I have stacked together, and I want to produce side by side box plots.&lt;BR /&gt;But when I produce them there are major outliers in the box plots that cause the axes to be scaled poorly. There are only ever going to be a handful of these major outliers so there is no issue with me just getting rid of them&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm pretty new to JMP so any help is appreciated. If you think there is a better/easier way of achieving this that would also be great.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Aug 2018 09:01:21 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-for-evaluating-tolerance-interval-USL-and-LSL-after/m-p/68511#M34857</guid>
      <dc:creator>DannyORegan94</dc:creator>
      <dc:date>2018-08-17T09:01:21Z</dc:date>
    </item>
    <item>
      <title>Re: JSL for evaluating tolerance interval USL and LSL after calculation</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-for-evaluating-tolerance-interval-USL-and-LSL-after/m-p/68513#M34859</link>
      <description>&lt;P&gt;Are the tolerance limits and spec limits different?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Aug 2018 09:37:00 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-for-evaluating-tolerance-interval-USL-and-LSL-after/m-p/68513#M34859</guid>
      <dc:creator>gzmorgan0</dc:creator>
      <dc:date>2018-08-17T09:37:00Z</dc:date>
    </item>
    <item>
      <title>Re: JSL for evaluating tolerance interval USL and LSL after calculation</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-for-evaluating-tolerance-interval-USL-and-LSL-after/m-p/68514#M34860</link>
      <description>&lt;P&gt;Even if you want to script something it's good to do it by hand once, especially since JMP will often generate code that you can use.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With that in mind, take a look &lt;A href="https://www.jmp.com/support/help/14/tolerance-intervals.shtml" target="_self"&gt;here&lt;/A&gt; to see how to get the Tolerance Intervals via 'Analyze &amp;gt; Distribution'. Once you have these values, you could, for instance, use 'Rows &amp;gt; Row Selection &amp;gt; Select Where . . .', followed by 'Rows &amp;gt; Delete Rows'.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Aug 2018 09:50:33 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-for-evaluating-tolerance-interval-USL-and-LSL-after/m-p/68514#M34860</guid>
      <dc:creator>ian_jmp</dc:creator>
      <dc:date>2018-08-17T09:50:33Z</dc:date>
    </item>
    <item>
      <title>Re: JSL for evaluating tolerance interval USL and LSL after calculation</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-for-evaluating-tolerance-interval-USL-and-LSL-after/m-p/68515#M34861</link>
      <description>&lt;P&gt;No I want to use the tolerance limits as spec limits.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Aug 2018 09:52:52 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-for-evaluating-tolerance-interval-USL-and-LSL-after/m-p/68515#M34861</guid>
      <dc:creator>DannyORegan94</dc:creator>
      <dc:date>2018-08-17T09:52:52Z</dc:date>
    </item>
    <item>
      <title>Re: JSL for evaluating tolerance interval USL and LSL after calculation</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-for-evaluating-tolerance-interval-USL-and-LSL-after/m-p/68516#M34862</link>
      <description>&lt;P&gt;Hi Ian, thank you for the reply. I know how to write the script that will generate the distribution report and calculate the tolerance interval. Its the next part that I am stuck on. When I get JMP to generate a script for the tolerance interval this is what it gives me:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Distribution(
	Continuous Distribution(
		Column( :Data ),
		Tolerance Interval( Alpha( 0.95 ), Proportion( 0.99 ) )
	)
)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;So you can see, at this point in my script I do not know my USL and LSL.&amp;nbsp;&lt;/SPAN&gt;I need my script to somehow read what the USL/LSL of the tolerance interval that it has just calculated are and then exclude/delete rows accordingly.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Aug 2018 10:01:41 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-for-evaluating-tolerance-interval-USL-and-LSL-after/m-p/68516#M34862</guid>
      <dc:creator>DannyORegan94</dc:creator>
      <dc:date>2018-08-17T10:01:41Z</dc:date>
    </item>
    <item>
      <title>Re: JSL for evaluating tolerance interval USL and LSL after calculation</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-for-evaluating-tolerance-interval-USL-and-LSL-after/m-p/68517#M34863</link>
      <description>&lt;P&gt;OK Danny. Sometimes you can get the required values directly, and sometimes you need to access the report layer to get them (try 'Help &amp;gt; Books &amp;gt; Scripting Guide').&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This code should get you started:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;NamesDefaultToHere(1);

// Do the Distribution
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dist = dt &amp;lt;&amp;lt; Distribution( Column( :Height ) );

// Add tolerance intervals (search for the latter using 'Help &amp;gt; Scripting Guide')
dist &amp;lt;&amp;lt; Tolerance Interval(Alpha( 0.95 ), Proportion( 0.85 ));

// Get the report layer
distRep = dist &amp;lt;&amp;lt; Report;

// Dig out the required values (do 'Show Tree Structure' to see how the report is made up)
lt = distRep[NumberColBox(5)] &amp;lt;&amp;lt; get;
ut = distRep[NumberColBox(6)] &amp;lt;&amp;lt; get;

// Set extreme values to missing
vals = Column(dt, "Height") &amp;lt;&amp;lt; getValues;
vals[Loc(vals &amp;lt; lt[1] | vals &amp;gt; ut[1] )] = .;
Column(dt, "Height") &amp;lt;&amp;lt; setValues(vals);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 17 Aug 2018 10:20:59 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-for-evaluating-tolerance-interval-USL-and-LSL-after/m-p/68517#M34863</guid>
      <dc:creator>ian_jmp</dc:creator>
      <dc:date>2018-08-17T10:20:59Z</dc:date>
    </item>
    <item>
      <title>Re: JSL for evaluating tolerance interval USL and LSL after calculation</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-for-evaluating-tolerance-interval-USL-and-LSL-after/m-p/68518#M34864</link>
      <description>&lt;P&gt;Ian is faster than I. Below is a script for the stacked data.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As Ian was alluding, you need to learn more JSL for selecting and getting values from tables and reports.&amp;nbsp; To be prepared for your next script you should read the&amp;nbsp; Help&amp;gt; Books&amp;gt; Scripting Guide chapters "Scripting Platforms" and "Display Trees". This will help you understand the nested structure of JMP reports and learn the syntax to navigate, reference and get.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note that Ian's script empties values. This script maintains their values them, but excludes them from the analyses.&amp;nbsp;&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_stck = dt &amp;lt;&amp;lt; Stack(
	columns( :height, :weight ),
	Source Label Column( "Var" ),
	Stacked Data Column( "Data" )
);
close(dt,NoSave);
obj = Distribution( Column( :Data ), By(:Var) );

//using a lower proportion, .80,  to screen something
obj &amp;lt;&amp;lt; Tolerance Interval( Alpha( 0.95 ), Proportion( 0.8 ) ); 
 
tol_dt = report(obj[1])[OutlineBox(2)]["Tolerance Intervals"][TableBox(1)]&amp;lt;&amp;lt;Make Combined Data Table;
tol_dt &amp;lt;&amp;lt; set Name("Tolerance Intervals");

for(i=1, i&amp;lt;=nrow(tol_dt), i++,
	str = tol_dt:Var[i];
	vlo = tol_dt:Lower TI[i];
	vhi = tol_dt:Upper TI[i];
	dt_stck &amp;lt;&amp;lt; select where(:Var==str &amp;amp; (:Data &amp;lt; vlo | :Data &amp;gt; vhi) ) &amp;lt;&amp;lt; hide and exclude(1);
	dt_stck &amp;lt;&amp;lt; clear select;
);

nw = New Window("Custom Display",
  VListBox(
   onew = dt_stck &amp;lt;&amp;lt; Oneway( Y(:Data), X(:Var)),
   text box(),
   dbb = tol_dt  &amp;lt;&amp;lt;New Data Box()
  )
);
dbb &amp;lt;&amp;lt; close side panels;
dbb &amp;lt;&amp;lt; set max size(410,240);
nw &amp;lt;&amp;lt; journal window;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 17 Aug 2018 10:40:10 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-for-evaluating-tolerance-interval-USL-and-LSL-after/m-p/68518#M34864</guid>
      <dc:creator>gzmorgan0</dc:creator>
      <dc:date>2018-08-17T10:40:10Z</dc:date>
    </item>
    <item>
      <title>Re: JSL for evaluating tolerance interval USL and LSL after calculation</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-for-evaluating-tolerance-interval-USL-and-LSL-after/m-p/68996#M34974</link>
      <description>Thank you! Very much appreciate the help! Sorry about the delay in accepting the answer, I haven't gone back to work on the script until today.</description>
      <pubDate>Tue, 21 Aug 2018 07:30:08 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-for-evaluating-tolerance-interval-USL-and-LSL-after/m-p/68996#M34974</guid>
      <dc:creator>DannyORegan94</dc:creator>
      <dc:date>2018-08-21T07:30:08Z</dc:date>
    </item>
  </channel>
</rss>

