<?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: Set spec limits for K sigma macro in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Set-spec-limits-for-K-sigma-macro/m-p/308208#M56258</link>
    <description>&lt;P&gt;Thanks for looking at this some more Tonya.&lt;/P&gt;&lt;P&gt;I agree the code you supplied works but it looks to work because you are assigning the distributions through the macro first.&amp;nbsp; If I remove the distributions and re add them manually and then just try and run the last two lines of the macro it doesn't work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I found interesting was that the fitted distributions had the name "Fitted Exponential" vs "Fitted Exponential Distribution" that shows up when I manually assign it.&amp;nbsp; So it got me thinking and....I can make it work if I use the legacy fits!&amp;nbsp; So if I enable the legacy fitters, fit the distributions manually, and then run the last two lines it works perfectly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So maybe there needs to be a script modification to be able to work with the new fit functionality that showed up in 15?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Steve&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 16 Sep 2020 18:11:32 GMT</pubDate>
    <dc:creator>shampton82</dc:creator>
    <dc:date>2020-09-16T18:11:32Z</dc:date>
    <item>
      <title>Set spec limits for K sigma macro</title>
      <link>https://community.jmp.com/t5/Discussions/Set-spec-limits-for-K-sigma-macro/m-p/306210#M56176</link>
      <description>&lt;P&gt;I use the "Distribution" platform along with "Set Spec Limits for KSigma" alot for getting suggested spec limits for non-normal data.&amp;nbsp; Workflow is Distribution-&amp;gt;assign a distribution-&amp;gt;process capability in the distribution out put-&amp;gt; Set Spec limits for K Sigma.&amp;nbsp; This can become a long process when you have lots of columns.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ideally I'd be able to assign the right distribution and then have a macro that would loop through each column and make the "Set Limit..." output.&amp;nbsp; I see that there is an example script for this functionality but it has a hard coded distribution and it also appears to only apply it to all columns.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It appears my first hurdle, which seems silly, is trying to get the assigned distribution from in the distribution platform so I can replace the hard coding of it (LogNormal in this example):&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Cities.jmp" );
obj = Distribution( Column( :CO ) );
obj &amp;lt;&amp;lt; Fit Distribution( LogNormal( Set Spec Limits for KSigma( 3 ) ) );&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I was thinking of using something like&amp;nbsp; current report()["Distributions"]&amp;lt;&amp;lt; get scriptable object;&lt;/P&gt;&lt;P&gt;to be able use the code for the open distribution analysis and then I have to figure out how to loop through the columns in the open distribution.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The other option I was thinking about was assigning the distributions as a column property and pulling from that and running a bunch of individual analysis but I didn't see code to go that route either.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for any ideas!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Steve&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 23:37:50 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Set-spec-limits-for-K-sigma-macro/m-p/306210#M56176</guid>
      <dc:creator>shampton82</dc:creator>
      <dc:date>2023-06-09T23:37:50Z</dc:date>
    </item>
    <item>
      <title>Re: Set spec limits for K sigma macro</title>
      <link>https://community.jmp.com/t5/Discussions/Set-spec-limits-for-K-sigma-macro/m-p/306344#M56181</link>
      <description>&lt;P&gt;"Show tree structure" May help you to adress the proper Position in the report.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Cities.jmp" );
obj = Distribution( Column( :CO ) );
obj &amp;lt;&amp;lt; Fit Distribution( LogNormal( Set Spec Limits for KSigma( 3 ) ) );

obj &amp;lt;&amp;lt; show tree structure;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Sep 2020 08:00:30 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Set-spec-limits-for-K-sigma-macro/m-p/306344#M56181</guid>
      <dc:creator>Georg</dc:creator>
      <dc:date>2020-09-14T08:00:30Z</dc:date>
    </item>
    <item>
      <title>Re: Set spec limits for K sigma macro</title>
      <link>https://community.jmp.com/t5/Discussions/Set-spec-limits-for-K-sigma-macro/m-p/306857#M56196</link>
      <description>&lt;P&gt;If you only have one fit per response, you can use the following:&lt;/P&gt;
&lt;P&gt;obj&amp;lt;&amp;lt;(Fit Handle[1]&amp;lt;&amp;lt;( Set Spec Limits for KSigma( 3 ) ) );&lt;/P&gt;</description>
      <pubDate>Mon, 14 Sep 2020 16:07:01 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Set-spec-limits-for-K-sigma-macro/m-p/306857#M56196</guid>
      <dc:creator>tonya_mauldin</dc:creator>
      <dc:date>2020-09-14T16:07:01Z</dc:date>
    </item>
    <item>
      <title>Re: Set spec limits for K sigma macro</title>
      <link>https://community.jmp.com/t5/Discussions/Set-spec-limits-for-K-sigma-macro/m-p/306924#M56203</link>
      <description>&lt;P&gt;Thanks Tonya!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That works really well.&amp;nbsp; However, it only appears to work if I have one column in the Distribution Analysis.&amp;nbsp; Is there something I need to change to have it work when I have multiple columns in the analysis?&amp;nbsp; If I have more than one it doesn't work; no error but also nothing happens.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The script from the sample library will run with multiple columns (though it is a hard coded distribution choice).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Steve&lt;/P&gt;</description>
      <pubDate>Mon, 14 Sep 2020 18:54:37 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Set-spec-limits-for-K-sigma-macro/m-p/306924#M56203</guid>
      <dc:creator>shampton82</dc:creator>
      <dc:date>2020-09-14T18:54:37Z</dc:date>
    </item>
    <item>
      <title>Re: Set spec limits for K sigma macro</title>
      <link>https://community.jmp.com/t5/Discussions/Set-spec-limits-for-K-sigma-macro/m-p/306925#M56204</link>
      <description>&lt;P&gt;It worked for me with multiple columns.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Open( "$SAMPLE_DATA/Cities.jmp" );
obj = Distribution( Column( :CO, :POP ) );
obj &amp;lt;&amp;lt; Fit Distribution( exponential ) ;
obj&amp;lt;&amp;lt;(Fit Handle[1]&amp;lt;&amp;lt;( Set Spec Limits for KSigma( 3 ) ) );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 14 Sep 2020 19:05:21 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Set-spec-limits-for-K-sigma-macro/m-p/306925#M56204</guid>
      <dc:creator>tonya_mauldin</dc:creator>
      <dc:date>2020-09-14T19:05:21Z</dc:date>
    </item>
    <item>
      <title>Re: Set spec limits for K sigma macro</title>
      <link>https://community.jmp.com/t5/Discussions/Set-spec-limits-for-K-sigma-macro/m-p/306928#M56207</link>
      <description>&lt;P&gt;It would probably&amp;nbsp;help if I included my script:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt=Current Data Table();
ex=current report()["Distributions"]&amp;lt;&amp;lt; get scriptable object;
ex&amp;lt;&amp;lt;(Fit Handle[1]&amp;lt;&amp;lt;( Set Spec Limits for KSigma( 3 ) ) );&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Ideally I would run the distribution platform, select my distribution for each column, then run this script to set all the spec limits.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So this works, but only if I have one column in the Distribution Analysis.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Steve&lt;/P&gt;</description>
      <pubDate>Mon, 14 Sep 2020 19:42:19 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Set-spec-limits-for-K-sigma-macro/m-p/306928#M56207</guid>
      <dc:creator>shampton82</dc:creator>
      <dc:date>2020-09-14T19:42:19Z</dc:date>
    </item>
    <item>
      <title>Re: Set spec limits for K sigma macro</title>
      <link>https://community.jmp.com/t5/Discussions/Set-spec-limits-for-K-sigma-macro/m-p/308185#M56255</link>
      <description>&lt;P&gt;The code works fine for me if I have more than 1 column in distribution.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Open( "$SAMPLE_DATA/Cities.jmp" );
obj = Distribution(
	Continuous Distribution(
		Column( :CO ),
		Fit Distribution(
			Exponential
		)
	),
	Continuous Distribution( Column( :POP ), Fit Distribution( Gamma) )
);
ex=current report()["Distributions"]&amp;lt;&amp;lt; get scriptable object;
ex&amp;lt;&amp;lt;(Fit Handle[1]&amp;lt;&amp;lt;( Set Spec Limits for KSigma( 3 ) ) );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 16 Sep 2020 17:23:05 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Set-spec-limits-for-K-sigma-macro/m-p/308185#M56255</guid>
      <dc:creator>tonya_mauldin</dc:creator>
      <dc:date>2020-09-16T17:23:05Z</dc:date>
    </item>
    <item>
      <title>Re: Set spec limits for K sigma macro</title>
      <link>https://community.jmp.com/t5/Discussions/Set-spec-limits-for-K-sigma-macro/m-p/308208#M56258</link>
      <description>&lt;P&gt;Thanks for looking at this some more Tonya.&lt;/P&gt;&lt;P&gt;I agree the code you supplied works but it looks to work because you are assigning the distributions through the macro first.&amp;nbsp; If I remove the distributions and re add them manually and then just try and run the last two lines of the macro it doesn't work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I found interesting was that the fitted distributions had the name "Fitted Exponential" vs "Fitted Exponential Distribution" that shows up when I manually assign it.&amp;nbsp; So it got me thinking and....I can make it work if I use the legacy fits!&amp;nbsp; So if I enable the legacy fitters, fit the distributions manually, and then run the last two lines it works perfectly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So maybe there needs to be a script modification to be able to work with the new fit functionality that showed up in 15?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Steve&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Sep 2020 18:11:32 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Set-spec-limits-for-K-sigma-macro/m-p/308208#M56258</guid>
      <dc:creator>shampton82</dc:creator>
      <dc:date>2020-09-16T18:11:32Z</dc:date>
    </item>
    <item>
      <title>Re: Set spec limits for K sigma macro</title>
      <link>https://community.jmp.com/t5/Discussions/Set-spec-limits-for-K-sigma-macro/m-p/309322#M56325</link>
      <description>&lt;P&gt;You are mixing new fitters with legacy fitters.&amp;nbsp; The code needs to be completely different for the new fitters.&amp;nbsp; Below is some example code for the new fitters.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Open( "$SAMPLE_DATA/Cities.jmp" );
obj = dt&amp;lt;&amp;lt;Distribution(
	Continuous Distribution( Column( :CO ), Fit Exponential ),
	Continuous Distribution( Column( :SO2 ), Fit Gamma )
);
obj&amp;lt;&amp;lt;(Fit Handle[1]&amp;lt;&amp;lt;Process Capability( Set Sigma Multiplier for Quantile Spec Limits( 3 ) ) );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 18 Sep 2020 17:35:40 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Set-spec-limits-for-K-sigma-macro/m-p/309322#M56325</guid>
      <dc:creator>tonya_mauldin</dc:creator>
      <dc:date>2020-09-18T17:35:40Z</dc:date>
    </item>
    <item>
      <title>Re: Set spec limits for K sigma macro</title>
      <link>https://community.jmp.com/t5/Discussions/Set-spec-limits-for-K-sigma-macro/m-p/309470#M56334</link>
      <description>&lt;P&gt;That did it, turns out that part of the issue was of my own doing.&amp;nbsp; I didn't realize that Handle[1] was to the first distribution in the list order (Normal, Cauchy, Lognormal, etc), not the first distribution in the AIC ordered table.&amp;nbsp; So the macro would run and I wouldn't see anything because it had been applied to the Normal distribution and that was hidden. If I changed Handle[1] to Handle["best"] then it worked with the best chosen distribution.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Final code was simply this (though I learned a lot!)&amp;nbsp; Thanks again for all the help Tonya!&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt=Current Data Table();

pf=current report()["Distributions"]&amp;lt;&amp;lt; get scriptable object;

pf&amp;lt;&amp;lt;(Fit Handle["best"]&amp;lt;&amp;lt;Process Capability( Set Sigma Multiplier for Quantile Spec Limits( 3 ) ) );&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 19 Sep 2020 02:04:57 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Set-spec-limits-for-K-sigma-macro/m-p/309470#M56334</guid>
      <dc:creator>shampton82</dc:creator>
      <dc:date>2020-09-19T02:04:57Z</dc:date>
    </item>
  </channel>
</rss>

