<?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: Is there a way to automate/script the Winsor process of outlier filtering? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Is-there-a-way-to-automate-script-the-Winsor-process-of-outlier/m-p/14856#M13803</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This code did it for me!!&amp;nbsp; Thanks!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 03 Nov 2015 00:55:13 GMT</pubDate>
    <dc:creator>chfields</dc:creator>
    <dc:date>2015-11-03T00:55:13Z</dc:date>
    <item>
      <title>Is there a way to automate/script the Winsor process of outlier filtering?</title>
      <link>https://community.jmp.com/t5/Discussions/Is-there-a-way-to-automate-script-the-Winsor-process-of-outlier/m-p/14844#M13791</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" height="69" style="width: 828px; height: 70px;" width="827"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD height="19" width="64"&gt;Is there a way to automate/script the Winsor process of outlier filtering? I found the two addins from Brady, but those do not exclude the&amp;nbsp; outlier rows, they only pertain to the enhancing the Summary function.&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.jmp.com/docs/DOC-6232" target="_blank"&gt;Imputation Addin&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.jmp.com/docs/DOC-6231" target="_blank"&gt;Extended Summary Add-in&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Oct 2016 13:21:53 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Is-there-a-way-to-automate-script-the-Winsor-process-of-outlier/m-p/14844#M13791</guid>
      <dc:creator>chfields</dc:creator>
      <dc:date>2016-10-28T13:21:53Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to automate/script the Winsor process of outlier filtering?</title>
      <link>https://community.jmp.com/t5/Discussions/Is-there-a-way-to-automate-script-the-Winsor-process-of-outlier/m-p/14845#M13792</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your question confuses me.&amp;nbsp; Winsorising outliers is generally defined as setting the extreme values to a specified percentile, not excluding them.&amp;nbsp; It is analogous to clipping in signal processing.&amp;nbsp; Excluding outlier rows is generally not Winsorising.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That said, any algorithmic approach your heart desires can be scripted.&amp;nbsp; If you write a script to do it, use matrices.&amp;nbsp; They run a whole lot faster, especially with large datasets.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Oct 2015 23:14:13 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Is-there-a-way-to-automate-script-the-Winsor-process-of-outlier/m-p/14845#M13792</guid>
      <dc:creator>Kevin_Anderson</dc:creator>
      <dc:date>2015-10-15T23:14:13Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to automate/script the Winsor process of outlier filtering?</title>
      <link>https://community.jmp.com/t5/Discussions/Is-there-a-way-to-automate-script-the-Winsor-process-of-outlier/m-p/14846#M13793</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Most all actions in JMP can be scripted by going to the red triangle and go to SCRIPT &amp;gt; COPY SCRIPT&lt;/P&gt;&lt;P&gt;This way you can glue together these bits of scripts into a larger automated program.&lt;/P&gt;&lt;P&gt;This is true for every JMP action/function, etc.... with the EXCEPTION of the Robust Outlier Filter function under:&lt;/P&gt;&lt;P&gt;COL &amp;gt; MODELING UTILITIES &amp;gt; EXPLORE OUTLIERS&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to automate the Huber filter with K=3 on a given set of parameters.&amp;nbsp; I will do this over and over again.&lt;/P&gt;&lt;P&gt;I want to automate it to ease my workload.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Oct 2015 18:37:23 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Is-there-a-way-to-automate-script-the-Winsor-process-of-outlier/m-p/14846#M13793</guid>
      <dc:creator>chfields</dc:creator>
      <dc:date>2015-10-20T18:37:23Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to automate/script the Winsor process of outlier filtering?</title>
      <link>https://community.jmp.com/t5/Discussions/Is-there-a-way-to-automate-script-the-Winsor-process-of-outlier/m-p/14847#M13794</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In general, it's considered poor taste and bad practice to filter outliers without knowing the cause.&amp;nbsp; Even when a cause is known, using a filtering criteria that doesn't apply to your data set will introduce even more error than just leaving the outliers in the dataset.&amp;nbsp; Important questions need to be asked, is the data symmetric? skewed? normal? is there any masking?&amp;nbsp; Is your data set really two different distributions?&amp;nbsp; Would splitting them be better?&amp;nbsp; It's impossible to really know your data without actually looking at it.&amp;nbsp; Automating outlier filtering will lead to false conclusions.&amp;nbsp; Just as bad a practice as "p-hacking".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Of course, this doesn't mean there aren't reasons to automate a process.&amp;nbsp; For example, using an outlier filtering criteria to automate updating control limits on a control chart where the data is viewed/monitored over a course of time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to automate it, you'll need to write the script.&amp;nbsp; You can see &lt;A href="http://www.rsc.org/images/robust-statistics-technical-brief-6_tcm18-214850.pdf" title="http://www.rsc.org/images/robust-statistics-technical-brief-6_tcm18-214850.pdf"&gt;http://www.rsc.org/images/robust-statistics-technical-brief-6_tcm18-214850.pdf&lt;/A&gt; for some more information on what the Huber Method is actually doing.&amp;nbsp; Hope this helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Oct 2015 19:56:20 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Is-there-a-way-to-automate-script-the-Winsor-process-of-outlier/m-p/14847#M13794</guid>
      <dc:creator>msharp</dc:creator>
      <dc:date>2015-10-20T19:56:20Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to automate/script the Winsor process of outlier filtering?</title>
      <link>https://community.jmp.com/t5/Discussions/Is-there-a-way-to-automate-script-the-Winsor-process-of-outlier/m-p/14848#M13795</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To &lt;A href="https://community.jmp.com/people/CHFields"&gt;CHFields&lt;/A&gt;​:&amp;nbsp; I understand better now.&amp;nbsp; That is not the ONLY robust procedure that's not easily scriptable!&amp;nbsp; The Robust Means and Robust Standard Deviation from the Distribution platform are not functions available to JSL either.&amp;nbsp; Please see last year's Christmas List for Santa...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To &lt;A href="https://community.jmp.com/people/msharp"&gt;msharp&lt;/A&gt;​: When I asked JMP for a reference for the Robust Mean and Robust Standard Deviation, the developer directed me to Huber, P.J.(1973); "Robust Regression: Asymptotics, Conjectures, and Monte Carlo"; The Annals of Statistics, Vol 1, No. 5, pp799-821, which detail procedures substantially different from the reference you quoted.&amp;nbsp; Peter Huber is a titan of Robust Statistics, and his more modern books on the subject (Robust Statistics 2004) sing the praises of M estimates (which the Annals paper also detailed), so I don't know if JMP is really doing the Winsorizing you reference.&amp;nbsp; Is it really?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Huber M estimates don't look like they would be too fun to script from scratch.&amp;nbsp; Hence the Christmas List request.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Oct 2015 21:54:26 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Is-there-a-way-to-automate-script-the-Winsor-process-of-outlier/m-p/14848#M13795</guid>
      <dc:creator>Kevin_Anderson</dc:creator>
      <dc:date>2015-10-20T21:54:26Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to automate/script the Winsor process of outlier filtering?</title>
      <link>https://community.jmp.com/t5/Discussions/Is-there-a-way-to-automate-script-the-Winsor-process-of-outlier/m-p/14849#M13796</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There are many ways to calculate Robust Mean and Robust Standard deviation.&amp;nbsp; The article I reference shows how to calculate the median (by definition is a robust mean) and MAD(robust standard deviation).&amp;nbsp; These are the most basic.&amp;nbsp; However, any metric that calculates the center and spread and is resistant to change due to outlier data can be considered a robust mean or robust std dev and there are certainly more complex algorithms than the median/MAD approach.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The reason I chose to share that article is because it shows the basics to the Winsorizing process using the easy to understand median/MAD.&amp;nbsp; If I was going to program the process from scratch I'd start here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not a JMP programmer so I don't know the actual method they use; but I doubt they use the method described in that paper.&amp;nbsp; That paper really is just helpful to understand the basics.&amp;nbsp; The paper itself states most the flaws, one that stands out most to a programmer is the slow convergence.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Oct 2015 23:38:43 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Is-there-a-way-to-automate-script-the-Winsor-process-of-outlier/m-p/14849#M13796</guid>
      <dc:creator>msharp</dc:creator>
      <dc:date>2015-10-20T23:38:43Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to automate/script the Winsor process of outlier filtering?</title>
      <link>https://community.jmp.com/t5/Discussions/Is-there-a-way-to-automate-script-the-Winsor-process-of-outlier/m-p/14850#M13797</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I followed the Huber method described in the AMC paper that msharp link to.&amp;nbsp; Scripting it wasn't too bad, the hard part is knowing if I've interpreted the algorithm correctly.&amp;nbsp; It would seem that as I iterate through (say N times) and update the data array with a new mean-hat +/- 1.5 x sigma-hat value, that for the ith iteration I would use the data array from i-1 but this doesn't work for me. I get better results by always updating the original data (i=0) while using updated mean-hat and sigma-hat.&amp;nbsp; Better results but seems wrong. Does anyone have experience implementing this algorithm?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Incidentally, according to this page (&lt;A href="http://www.jmp.com/support/help/The_Distribution_Report.shtml#311398" title="http://www.jmp.com/support/help/The_Distribution_Report.shtml#311398"&gt;The Distribution Report&lt;/A&gt;), JMP's robust mean / standard deviation in the distribution platform is using Huber M-estimation, but I'm not sure how they are windsorizing. My script produces similar results in some cases, and not so similar in others. But as I stated above I'm not sure if I'm doing it correctly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;Mike&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Oct 2015 22:53:14 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Is-there-a-way-to-automate-script-the-Winsor-process-of-outlier/m-p/14850#M13797</guid>
      <dc:creator>mikedriscoll</dc:creator>
      <dc:date>2015-10-22T22:53:14Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to automate/script the Winsor process of outlier filtering?</title>
      <link>https://community.jmp.com/t5/Discussions/Is-there-a-way-to-automate-script-the-Winsor-process-of-outlier/m-p/14851#M13798</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here's my quick code following the paper exact:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Data Set in Paper&lt;/P&gt;&lt;P&gt;x = [4.5,4.9,5.6,4.2,6.2,5.2,9.9];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Determine Median and Robust Sigma (MAD)&lt;/P&gt;&lt;P&gt;mean = quantile(.5,x); &lt;/P&gt;&lt;P&gt;y = abs(x - mean);&lt;/P&gt;&lt;P&gt;MAD = quantile(.5,y);&lt;/P&gt;&lt;P&gt;sigma = MAD*1.5;&lt;/P&gt;&lt;P&gt;sigmaold = 0;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Converge&lt;/P&gt;&lt;P&gt;while(abs(sigma - sigmaold) &amp;gt; 2e-16,&lt;/P&gt;&lt;P&gt;&amp;nbsp; for(i=1,i&amp;lt;=nrows(x),i++,&lt;/P&gt;&lt;P&gt;&amp;nbsp; if(x&lt;I&gt;&amp;lt;mean-1.5*sigma,&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; x&lt;I&gt; = mean-1.5*sigma&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; );&lt;/P&gt;&lt;P&gt;&amp;nbsp; if(x&lt;I&gt;&amp;gt;mean+1.5*sigma,&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; x&lt;I&gt; = mean+1.5*sigma&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; );&lt;/P&gt;&lt;P&gt;&amp;nbsp; );&lt;/P&gt;&lt;P&gt;&amp;nbsp; meanold = mean;&lt;/P&gt;&lt;P&gt;&amp;nbsp; sigmaold = sigma;&lt;/P&gt;&lt;P&gt;&amp;nbsp; mean = mean(x);&lt;/P&gt;&lt;P&gt;&amp;nbsp; sigma = 1.134*std dev(x);&lt;/P&gt;&lt;P&gt;);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Evaluate&lt;/P&gt;&lt;P&gt;print(x);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Oct 2015 15:13:14 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Is-there-a-way-to-automate-script-the-Winsor-process-of-outlier/m-p/14851#M13798</guid>
      <dc:creator>msharp</dc:creator>
      <dc:date>2015-10-23T15:13:14Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to automate/script the Winsor process of outlier filtering?</title>
      <link>https://community.jmp.com/t5/Discussions/Is-there-a-way-to-automate-script-the-Winsor-process-of-outlier/m-p/14852#M13799</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.jmp.com/people/CHFields"&gt;CHFields&lt;/A&gt;​: to answer your original question: Yes, there is a way to automate outlier filtering.&amp;nbsp; In fact, there are a very large (if not infinite) number of ways.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The &lt;A href="https://community.jmp.com/people/msharp"&gt;msharp&lt;/A&gt;​ script (original data mean of 5.785 with JMP Robust Mean/Huber Center of 5.735) yields a Winsorized mean of 5.339.&amp;nbsp; If you really want to go down the rabbit hole, a 12A One-Step Hampel W-Estimator (a robust mean recommended by Andrews,D.F., et. al (1972); &lt;SPAN style="text-decoration: underline;"&gt;Robust Estimates of Location: Survey and Advances&lt;/SPAN&gt;; Princeton University Press) yields 5.256 on the same data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it concerning that all these measures of location are so different on the same data?&amp;nbsp; Not really.&amp;nbsp; Like St. Gregory the Miracle Worker said, "That which is different is not the same."&amp;nbsp; Thoughtful researchers will not use the mean without at least some form of a reasonable rejection procedure.&amp;nbsp; &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;It would be great if that reasonable procedure were easily implemented in a JMP function that could be called from a script, but without that being an option, the Winsorizing script from &lt;/SPAN&gt;&lt;A href="https://community.jmp.com/people/msharp"&gt;msharp&lt;/A&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;​ would be a great alternative, as long as you identify the method used and also heed the earlier "poor taste and bad practice" warnings as well.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a robust day!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Oct 2015 21:53:42 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Is-there-a-way-to-automate-script-the-Winsor-process-of-outlier/m-p/14852#M13799</guid>
      <dc:creator>Kevin_Anderson</dc:creator>
      <dc:date>2015-10-23T21:53:42Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to automate/script the Winsor process of outlier filtering?</title>
      <link>https://community.jmp.com/t5/Discussions/Is-there-a-way-to-automate-script-the-Winsor-process-of-outlier/m-p/14853#M13800</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That is essentially what I had, although i had everything in array format so i could inspect the data for each iteration. Yours is cleaner, so I hope you don't mind I've modified it a bit. I replaced the for() loop with the Loc function as it might be more efficient in case anyone else is using this for large data sets. (Disclaimer, I've used this function only once or twice... hopefully it is the right choice.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I ran&amp;nbsp; your function and mine, I found that it converged in 1 iteration with a mean of 5.339 and a sigma of 1.044. The paper seems to indicate it would take several iterations. I thought they meant even for this data set but maybe they were generalizing. They go on to say that the Huber estimated mean is 5.36 and sigma is 1.15. I was not able to reproduce that estimated mean, but when I replaced 'x' data with x_orig (original data) in each iteration, I got a mean of 5.386 and sigma of 1.1459.&amp;nbsp; You can see the line in the code below to enable / disable this. This doesn't really feel like the correct way to iterate something, but I'm not really sure where I've gone wrong in being able to compute this. Forgive the sig digits errors but I wanted to show more about the variable contents here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From the paper: &lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="10271_pastedImage_0.png" style="width: 205px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/2354iF87EFEB238120CFA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="10271_pastedImage_0.png" alt="10271_pastedImage_0.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: #0000dd;"&gt;names default to here&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: teal;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;)&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: #0000dd;"&gt;clear log&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10.0pt; font-family: 'Courier New';"&gt;()&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: green;"&gt;//Data Set in Paper&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;x_orig &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt; &lt;STRONG&gt;[&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10.0pt; font-family: 'Courier New';"&gt;4.5&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt; &lt;STRONG style="color: teal; font-size: 10.0pt; font-family: 'Courier New';"&gt;4.9&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt; &lt;STRONG style="color: teal; font-size: 10.0pt; font-family: 'Courier New';"&gt;5.6&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt; &lt;STRONG style="color: teal; font-size: 10.0pt; font-family: 'Courier New';"&gt;4.2&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt; &lt;STRONG style="color: teal; font-size: 10.0pt; font-family: 'Courier New';"&gt;6.2&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt; &lt;STRONG style="color: teal; font-size: 10.0pt; font-family: 'Courier New';"&gt;5.2&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: teal;"&gt;9.9&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;]&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;x &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt; &lt;STRONG&gt;[&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10.0pt; font-family: 'Courier New';"&gt;4.5&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt; &lt;STRONG style="color: teal; font-size: 10.0pt; font-family: 'Courier New';"&gt;4.9&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt; &lt;STRONG style="color: teal; font-size: 10.0pt; font-family: 'Courier New';"&gt;5.6&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt; &lt;STRONG style="color: teal; font-size: 10.0pt; font-family: 'Courier New';"&gt;4.2&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt; &lt;STRONG style="color: teal; font-size: 10.0pt; font-family: 'Courier New';"&gt;6.2&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt; &lt;STRONG style="color: teal; font-size: 10.0pt; font-family: 'Courier New';"&gt;5.2&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: teal;"&gt;9.9&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;]&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: green;"&gt;//Determine Median and Robust Sigma (MAD)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;mean &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: #0000dd;"&gt;Quantile&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10.0pt; font-family: 'Courier New';"&gt;(&lt;/STRONG&gt; &lt;STRONG style="color: teal; font-size: 10.0pt; font-family: 'Courier New';"&gt;.5&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt; x &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;y &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: #0000dd;"&gt;Abs&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10.0pt; font-family: 'Courier New';"&gt;(&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt; x &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;-&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt; mean &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;MAD &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: #0000dd;"&gt;Quantile&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10.0pt; font-family: 'Courier New';"&gt;(&lt;/STRONG&gt; &lt;STRONG style="color: teal; font-size: 10.0pt; font-family: 'Courier New';"&gt;.5&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt; y &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;sigma &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt; MAD &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;*&lt;/SPAN&gt; &lt;STRONG style="color: teal; font-size: 10.0pt; font-family: 'Courier New';"&gt;1.5&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;sigmaold &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;=&lt;/SPAN&gt; &lt;STRONG style="color: teal; font-size: 10.0pt; font-family: 'Courier New';"&gt;0&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: green;"&gt;//Converge&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: #0000dd;"&gt;While&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10.0pt; font-family: 'Courier New';"&gt;(&lt;/STRONG&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: #0000dd;"&gt;Abs&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10.0pt; font-family: 'Courier New';"&gt;(&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt; sigma &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;-&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt; sigmaold &lt;STRONG&gt;)&lt;/STRONG&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;&amp;gt;&lt;/SPAN&gt; &lt;STRONG style="color: teal; font-size: 10.0pt; font-family: 'Courier New';"&gt;2e-16&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: green;"&gt;//x = x_orig;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // try turning this on / off&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x &lt;STRONG&gt;[&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: #0000dd;"&gt;Loc&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10.0pt; font-family: 'Courier New';"&gt;(&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;x &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt; &lt;STRONG&gt;(&lt;/STRONG&gt;mean &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;+&lt;/SPAN&gt; &lt;STRONG style="color: teal; font-size: 10.0pt; font-family: 'Courier New';"&gt;1.5&lt;/STRONG&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;*&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt; sigma&lt;STRONG&gt;))]&lt;/STRONG&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt; mean &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;+&lt;/SPAN&gt; &lt;STRONG style="color: teal; font-size: 10.0pt; font-family: 'Courier New';"&gt;1.5&lt;/STRONG&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;*&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt; sigma&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x &lt;STRONG&gt;[&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: #0000dd;"&gt;Loc&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10.0pt; font-family: 'Courier New';"&gt;(&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;x &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt; &lt;STRONG&gt;(&lt;/STRONG&gt;mean &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;-&lt;/SPAN&gt; &lt;STRONG style="color: teal; font-size: 10.0pt; font-family: 'Courier New';"&gt;1.5&lt;/STRONG&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;*&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt; sigma&lt;STRONG&gt;))]&lt;/STRONG&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt; mean &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;-&lt;/SPAN&gt; &lt;STRONG style="color: teal; font-size: 10.0pt; font-family: 'Courier New';"&gt;1.5&lt;/STRONG&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;*&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt; sigma&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; meanold &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt; mean&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sigmaold &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt; sigma&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mean &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: #0000dd;"&gt;Mean&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10.0pt; font-family: 'Courier New';"&gt;(&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt; x &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sigma &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;=&lt;/SPAN&gt; &lt;STRONG style="color: teal; font-size: 10.0pt; font-family: 'Courier New';"&gt;1.134&lt;/STRONG&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;*&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: #0000dd;"&gt;Std Dev&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10.0pt; font-family: 'Courier New';"&gt;(&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt; x &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: #0000dd;"&gt;show&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10.0pt; font-family: 'Courier New';"&gt;(&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;mean&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt; sigma&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;STRONG style="color: black; font-size: 10.0pt; font-family: 'Courier New';"&gt;)&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;Mike&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Oct 2016 01:02:19 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Is-there-a-way-to-automate-script-the-Winsor-process-of-outlier/m-p/14853#M13800</guid>
      <dc:creator>mikedriscoll</dc:creator>
      <dc:date>2016-10-19T01:02:19Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to automate/script the Winsor process of outlier filtering?</title>
      <link>https://community.jmp.com/t5/Discussions/Is-there-a-way-to-automate-script-the-Winsor-process-of-outlier/m-p/14854#M13801</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, yes.&amp;nbsp; We'd want to run the winsorization process on the original data set with the adjusted mean and sigma changing.&amp;nbsp; Adding the x=xorig is correct.&amp;nbsp; Like I said I coded it quickly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As for matching the paper:&lt;/P&gt;&lt;P&gt;Since the data set has only 1 degree of freedom (what value to approximate the outlier) both sigma and mean are fixed based on the winsorization.&amp;nbsp; Given this fact there's no way to get a mean of 5.36 AND sigma of 1.15.&amp;nbsp; 5.386 and 1.145 rounded to the second digit would yield 5.39 and 1.15. Thus, m&lt;SPAN style="font-size: 13.3333px; line-height: 1.5em;"&gt;y best guess is that this is a simple typo, and not a &lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px; line-height: 20px;"&gt;mathematical&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px; line-height: 1.5em;"&gt; error.&amp;nbsp; Given the correctness of the paper up to that point, and it coming from the Analytical Methods Committee from the Royal Society of Chemistry I'll give them the benefit of the doubt.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Oct 2015 20:43:40 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Is-there-a-way-to-automate-script-the-Winsor-process-of-outlier/m-p/14854#M13801</guid>
      <dc:creator>msharp</dc:creator>
      <dc:date>2015-10-26T20:43:40Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to automate/script the Winsor process of outlier filtering?</title>
      <link>https://community.jmp.com/t5/Discussions/Is-there-a-way-to-automate-script-the-Winsor-process-of-outlier/m-p/14855#M13802</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Oct 2015 20:55:56 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Is-there-a-way-to-automate-script-the-Winsor-process-of-outlier/m-p/14855#M13802</guid>
      <dc:creator>mikedriscoll</dc:creator>
      <dc:date>2015-10-26T20:55:56Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to automate/script the Winsor process of outlier filtering?</title>
      <link>https://community.jmp.com/t5/Discussions/Is-there-a-way-to-automate-script-the-Winsor-process-of-outlier/m-p/14856#M13803</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This code did it for me!!&amp;nbsp; Thanks!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Nov 2015 00:55:13 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Is-there-a-way-to-automate-script-the-Winsor-process-of-outlier/m-p/14856#M13803</guid>
      <dc:creator>chfields</dc:creator>
      <dc:date>2015-11-03T00:55:13Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to automate/script the Winsor process of outlier filtering?</title>
      <link>https://community.jmp.com/t5/Discussions/Is-there-a-way-to-automate-script-the-Winsor-process-of-outlier/m-p/14857#M13804</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't exactly get the x=x_orig.&lt;/P&gt;&lt;P&gt;It&amp;nbsp; seems like this would create an infinite loop; but it works so I cannot argue with that.&lt;/P&gt;&lt;P&gt;thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Nov 2015 00:56:51 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Is-there-a-way-to-automate-script-the-Winsor-process-of-outlier/m-p/14857#M13804</guid>
      <dc:creator>chfields</dc:creator>
      <dc:date>2015-11-03T00:56:51Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to automate/script the Winsor process of outlier filtering?</title>
      <link>https://community.jmp.com/t5/Discussions/Is-there-a-way-to-automate-script-the-Winsor-process-of-outlier/m-p/14858#M13805</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;Essentially what we are doing is accounting for over-estimations of the median/MAD.&amp;nbsp; In our example data set, using the median/MAD in the winzorization process adjusts the outlier point too much.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;&lt;SPAN style="font-size: 10pt; color: black;"&gt;x_orig &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: navy;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: black;"&gt; &lt;SPAN style="font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;&lt;STRONG&gt;[&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New'; color: teal;"&gt;&lt;STRONG&gt;4.5&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: navy;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #555555; font-size: 13px;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New'; color: teal;"&gt;&lt;STRONG&gt;4.9&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: navy;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #555555; font-size: 13px;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New'; color: teal;"&gt;&lt;STRONG&gt;5.6&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: navy;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #555555; font-size: 13px;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New'; color: teal;"&gt;&lt;STRONG&gt;4.2&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: navy;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #555555; font-size: 13px;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New'; color: teal;"&gt;&lt;STRONG&gt;6.2&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: navy;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #555555; font-size: 13px;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New'; color: teal;"&gt;&lt;STRONG&gt;5.2&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: navy;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #555555; font-size: 13px;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #555555;"&gt;&lt;STRONG&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; color: teal;"&gt;9.9&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; color: black;"&gt;]&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: navy;"&gt;;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: arial, helvetica, sans-serif; color: navy;"&gt;median and mad estimates:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: arial, helvetica, sans-serif; color: navy;"&gt;mean = 5.2; and sigma = 1.05;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: arial, helvetica, sans-serif; color: navy;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: arial, helvetica, sans-serif; color: navy;"&gt;using these estimates changes the data to:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: arial, helvetica, sans-serif; color: navy;"&gt;x_firstpass = &lt;SPAN style="color: black; font-size: 13.3333px; font-family: inherit; font-style: inherit;"&gt;&lt;STRONG&gt;[&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New'; color: teal;"&gt;&lt;STRONG&gt;4.5&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: navy;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #555555; font-size: 13px;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New'; color: teal;"&gt;&lt;STRONG&gt;4.9&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: navy;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #555555; font-size: 13px;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New'; color: teal;"&gt;&lt;STRONG&gt;5.6&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: navy;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #555555; font-size: 13px;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New'; color: teal;"&gt;&lt;STRONG&gt;4.2&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: navy;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #555555; font-size: 13px;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New'; color: teal;"&gt;&lt;STRONG&gt;6.2&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: navy;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #555555; font-size: 13px;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New'; color: teal;"&gt;&lt;STRONG&gt;5.2&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: navy;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #555555; font-size: 13px;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #555555;"&gt;&lt;STRONG&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; color: teal;"&gt;6.775&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; color: black;"&gt;]&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: navy;"&gt;;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: navy; font-size: 10pt; font-family: arial, helvetica, sans-serif;"&gt;This data gives us a better approximate of our mean and sigma:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: navy; font-size: 10pt; font-family: arial, helvetica, sans-serif;"&gt;adjusted mean = 5.34; sigma = 1.04;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: navy; font-size: 10pt; font-family: arial, helvetica, sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: navy; font-size: 10pt; font-family: arial, helvetica, sans-serif;"&gt;If we use the better estimates to winzorize the data set it would would lead to:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: navy; font-size: 10pt; font-family: arial, helvetica, sans-serif;"&gt;x_secondpass = &lt;SPAN style="color: black; font-size: 13.3333px; font-family: inherit; font-style: inherit;"&gt;&lt;STRONG&gt;[&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New'; color: teal;"&gt;&lt;STRONG&gt;4.5&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: navy;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #555555; font-size: 13px;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New'; color: teal;"&gt;&lt;STRONG&gt;4.9&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: navy;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #555555; font-size: 13px;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New'; color: teal;"&gt;&lt;STRONG&gt;5.6&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: navy;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #555555; font-size: 13px;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New'; color: teal;"&gt;&lt;STRONG&gt;4.2&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: navy;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #555555; font-size: 13px;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New'; color: teal;"&gt;&lt;STRONG&gt;6.2&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: navy;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #555555; font-size: 13px;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New'; color: teal;"&gt;&lt;STRONG&gt;5.2&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: navy;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #555555; font-size: 13px;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #555555;"&gt;&lt;STRONG&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; color: teal;"&gt;6.905&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; color: black;"&gt;]&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: navy;"&gt;;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: navy; font-size: 10pt; font-family: arial, helvetica, sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: arial, helvetica, sans-serif; color: navy;"&gt;However, if we use x instead of x_orig, the code won't find the outlier point 9.9 to adjust it accordingly, b/c 6.775 isn't an outlier when the mean = 5.34 and sigma = 1.04.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: arial, helvetica, sans-serif; color: navy;"&gt;thus:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: arial, helvetica, sans-serif; color: navy;"&gt;&lt;SPAN style="color: #000080; font-size: 13.3333px;"&gt;x_secondpass = &lt;/SPAN&gt;&lt;SPAN style="color: black; font-size: 13.3333px; font-family: inherit; font-style: inherit;"&gt;&lt;STRONG&gt;[&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New'; color: teal;"&gt;&lt;STRONG&gt;4.5&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: navy;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #555555; font-size: 13px;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New'; color: teal;"&gt;&lt;STRONG&gt;4.9&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: navy;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #555555; font-size: 13px;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New'; color: teal;"&gt;&lt;STRONG&gt;5.6&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: navy;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #555555; font-size: 13px;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New'; color: teal;"&gt;&lt;STRONG&gt;4.2&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: navy;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #555555; font-size: 13px;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New'; color: teal;"&gt;&lt;STRONG&gt;6.2&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: navy;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #555555; font-size: 13px;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New'; color: teal;"&gt;&lt;STRONG&gt;5.2&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: navy;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #555555; font-size: 13px;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #555555;"&gt;&lt;STRONG&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; color: teal;"&gt;6.775&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; color: black;"&gt;]&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: navy;"&gt;;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: navy; font-size: 10pt; font-family: arial, helvetica, sans-serif;"&gt;mean and sigma will be the same:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080; font-size: 13.3333px; font-family: arial, helvetica, sans-serif;"&gt;adjusted mean = 5.34; sigma = 1.04;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080; font-size: 13.3333px; font-family: arial, helvetica, sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080; font-size: 13.3333px; font-family: arial, helvetica, sans-serif;"&gt;sigma - sigma_old = 0&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080; font-size: 13.3333px; font-family: arial, helvetica, sans-serif;"&gt;and our convergence will believe it's completed.&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: arial, helvetica, sans-serif; color: navy;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: arial, helvetica, sans-serif; color: navy;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New'; color: navy;"&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;tl:dr - If you are trying to find the optimum zero point your code needs to be robust enough to run both directions.&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Nov 2015 21:22:31 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Is-there-a-way-to-automate-script-the-Winsor-process-of-outlier/m-p/14858#M13805</guid>
      <dc:creator>msharp</dc:creator>
      <dc:date>2015-11-03T21:22:31Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to automate/script the Winsor process of outlier filtering?</title>
      <link>https://community.jmp.com/t5/Discussions/Is-there-a-way-to-automate-script-the-Winsor-process-of-outlier/m-p/14859#M13806</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For the example in the AMC tech brief upon which the code in this thread is based, what is the tuning constant k?&amp;nbsp; I've seen the theoretical equations that relate to the tuning constant, but I haven't seen anything that describes windsorizing +/- n*sigma, and sigma_new = x * stddev(data), where (I would guess that) n and x are related to the tuning constant.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;Mike&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Nov 2015 23:08:44 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Is-there-a-way-to-automate-script-the-Winsor-process-of-outlier/m-p/14859#M13806</guid>
      <dc:creator>mikedriscoll</dc:creator>
      <dc:date>2015-11-03T23:08:44Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to automate/script the Winsor process of outlier filtering?</title>
      <link>https://community.jmp.com/t5/Discussions/Is-there-a-way-to-automate-script-the-Winsor-process-of-outlier/m-p/14860#M13807</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It would probably be worth your time to read some wiki articles.&amp;nbsp; Winsorization is just a process, similar to trimming.&amp;nbsp; &lt;/P&gt;&lt;P&gt;Wikipedia:&lt;/P&gt;&lt;P&gt;Winsorising or Winsorisation is the transformation of statistics by limiting extreme values in the statistical data to reduce the effect of possibly spurious outliers.&lt;/P&gt;&lt;P&gt;We only need a percentile, here we used 1.5sigma.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the article referenced, they use the median to winsorize, then used the winsorized data to better predict the center and spread.&amp;nbsp; They then winsorize again to even better predict the center and spread.&amp;nbsp; Here we winsorize to get a robust accurate mean/std dev.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The tuning constant is used to in Huber's M estimates.&amp;nbsp; This process is the opposite, instead you use M estimates to come up with a robust accurate mean/std dev to then winsorize the data.&amp;nbsp; When K approaches infinity the M-estimate mean = mean.&amp;nbsp; When K approaches 0 the M-estimate mean = median.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can see page 16 of this presentation &lt;A href="http://www.bauer.uh.edu/rsusmel/phd/ec1-25.pdf" title="http://www.bauer.uh.edu/rsusmel/phd/ec1-25.pdf"&gt;http://www.bauer.uh.edu/rsusmel/phd/ec1-25.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So to answer your question the tuning constant K is not used b/c we didn't use Huber's M-estimates.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Nov 2015 23:56:10 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Is-there-a-way-to-automate-script-the-Winsor-process-of-outlier/m-p/14860#M13807</guid>
      <dc:creator>msharp</dc:creator>
      <dc:date>2015-11-03T23:56:10Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to automate/script the Winsor process of outlier filtering?</title>
      <link>https://community.jmp.com/t5/Discussions/Is-there-a-way-to-automate-script-the-Winsor-process-of-outlier/m-p/14861#M13808</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, that makes a lot of sense. I guess I misunderstood the part in the AMC brief refering to Huber... I thought they meant Huber M-estimation, but I agree it is just iteratively windsorizing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for that link. It is helpful. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Nov 2015 19:13:59 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Is-there-a-way-to-automate-script-the-Winsor-process-of-outlier/m-p/14861#M13808</guid>
      <dc:creator>mikedriscoll</dc:creator>
      <dc:date>2015-11-04T19:13:59Z</dc:date>
    </item>
  </channel>
</rss>

