<?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: Save script for Fit Model with by group in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Save-script-for-Fit-Model-with-by-group/m-p/48853#M27763</link>
    <description>&lt;P&gt;Not sure exactly what workflow you envisage, but the thread implies a 'semi-automated' approach in which (someone!) refines each of the models 'by hand'.&lt;/P&gt;
&lt;P&gt;But regarding: "&lt;SPAN&gt;This is problematic because now I cannot righclick into the tables and "Save as Combined Data Table". I'm then missing the "Group"-Information.&lt;/SPAN&gt;" (and as you know already) it would be easy enough to reinstate this column programaically.&lt;/P&gt;
&lt;P&gt;Using 'Big Class', I made:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2017-12-19 at 12.08.05.png" style="width: 633px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/8754i737658AC4912D4A6/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2017-12-19 at 12.08.05.png" alt="Screen Shot 2017-12-19 at 12.08.05.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;so one could take the 'Intercept' cell as the indication that this and subsequent rows are for a new level of the 'By' group.&lt;/P&gt;</description>
    <pubDate>Tue, 19 Dec 2017 12:15:27 GMT</pubDate>
    <dc:creator>ian_jmp</dc:creator>
    <dc:date>2017-12-19T12:15:27Z</dc:date>
    <item>
      <title>Save script for Fit Model with by group</title>
      <link>https://community.jmp.com/t5/Discussions/Save-script-for-Fit-Model-with-by-group/m-p/48814#M27744</link>
      <description>&lt;P&gt;Hi JMPers,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm having a problem when saving a script to create multiple models that have been generated by Fit Model using a by-group. What I do is basically the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Use Fit Model:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="fitmodel.PNG" style="width: 841px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/8738i4D359BD5ADBB866F/image-size/large?v=v2&amp;amp;px=999" role="button" title="fitmodel.PNG" alt="fitmodel.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the second step I will refine the different models for each group:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="model.PNG" style="width: 441px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/8740i8AFF913594199D1F/image-size/large?v=v2&amp;amp;px=999" role="button" title="model.PNG" alt="model.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now I have two models. I would then like to save a script that reproduces this report. Sadly when saving the script using the typical way (Hotspot =&amp;gt; Save Script (All Objects) it gives me the following output:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="model2.PNG" style="width: 441px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/8741iE9DA3039736B22DA/image-size/large?v=v2&amp;amp;px=999" role="button" title="model2.PNG" alt="model2.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is problematic because now I cannot righclick into the tables and "Save as Combined Data Table". I'm then missing the "Group"-Information.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Would be very happy to learn how to do this.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Sebastian&lt;/P&gt;</description>
      <pubDate>Mon, 18 Dec 2017 16:22:32 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Save-script-for-Fit-Model-with-by-group/m-p/48814#M27744</guid>
      <dc:creator>shoffmeister</dc:creator>
      <dc:date>2017-12-18T16:22:32Z</dc:date>
    </item>
    <item>
      <title>Re: Save script for Fit Model with by group</title>
      <link>https://community.jmp.com/t5/Discussions/Save-script-for-Fit-Model-with-by-group/m-p/48816#M27745</link>
      <description>&lt;P&gt;I just found out I can split my table so that each group is a represented by an individual response column and then it works.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Would still like to know if it is possible to do it the other way around.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Dec 2017 16:42:44 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Save-script-for-Fit-Model-with-by-group/m-p/48816#M27745</guid>
      <dc:creator>shoffmeister</dc:creator>
      <dc:date>2017-12-18T16:42:44Z</dc:date>
    </item>
    <item>
      <title>Re: Save script for Fit Model with by group</title>
      <link>https://community.jmp.com/t5/Discussions/Save-script-for-Fit-Model-with-by-group/m-p/48819#M27747</link>
      <description>&lt;P&gt;Not sure when this was introduced (which version) but I believe the By-Group script will do what you need:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ByGroup.PNG" style="width: 424px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/8742i1833DFD7D68AA47E/image-size/large?v=v2&amp;amp;px=999" role="button" title="ByGroup.PNG" alt="ByGroup.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Dec 2017 17:45:07 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Save-script-for-Fit-Model-with-by-group/m-p/48819#M27747</guid>
      <dc:creator>ih</dc:creator>
      <dc:date>2017-12-18T17:45:07Z</dc:date>
    </item>
    <item>
      <title>Re: Save script for Fit Model with by group</title>
      <link>https://community.jmp.com/t5/Discussions/Save-script-for-Fit-Model-with-by-group/m-p/48836#M27756</link>
      <description>&lt;P&gt;What JMP does with "To Data Table (All Objects)"&amp;nbsp;when you have a By group is to basically create a separate report for each level of the By group and concatenate them all together within a vertical list box.&amp;nbsp; ih is right that at least with JMP 13 there is a "Save-By-Group Script" option.&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you're not on 13 yet, then here's how I used to do it.&amp;nbsp; Save a script to a data table the regular way (not for all objects, you'll just have to do more modifications to the script if you do).&amp;nbsp; Then, edit the script to add a Group() statement within the Fit Model() statement.&lt;/P&gt;&lt;P&gt;For example, if saving the script to data table gets you something like this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Fit Model(
	Y( :Y ),
	Effects( :X ),
	Personality( "Standard Least Squares" ),
	Emphasis( "Effect Screening" ),
	Run(
		Profiler( 0 ),
		:Y &amp;lt;&amp;lt; {Summary of Fit( 1 ), Analysis of Variance( 1 ),
		Parameter Estimates( 1 ), Effect Details( 0 ), Lack of Fit( 0 ),
		Sorted Estimates( 0 ), Scaled Estimates( 0 ), Plot Actual by Predicted( 1 ),
		Plot Residual by Predicted( 1 ), Plot Residual by Row( 1 ),
		Plot Studentized Residuals( 0 ), Plot Effect Leverage( 0 ),
		Box Cox Y Transformation( 0 ), Show VIF( 1 )}
	),
	&lt;FONT color="#993300"&gt;Where( :Group == "A" )&lt;/FONT&gt;
)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Delete the Where() clause and add a By() clause using the same column up by the other column specifications like so:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Fit Model(
	Y( :Y ),
	Effects( :X ),
	&lt;FONT color="#0000FF"&gt;By( :Group ),&lt;/FONT&gt;
	Personality( "Standard Least Squares" ),
	Emphasis( "Effect Screening" ),
	Run(
		Profiler( 0 ),
		:Y &amp;lt;&amp;lt; {Summary of Fit( 1 ), Analysis of Variance( 1 ),
		Parameter Estimates( 1 ), Effect Details( 0 ), Lack of Fit( 0 ),
		Sorted Estimates( 0 ), Scaled Estimates( 0 ), Plot Actual by Predicted( 1 ),
		Plot Residual by Predicted( 1 ), Plot Residual by Row( 1 ),
		Plot Studentized Residuals( 0 ), Plot Effect Leverage( 0 ),
		Box Cox Y Transformation( 0 ), Show VIF( 1 )}
	)
)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;You should now reproduce the Fit Model report broken out by each level of By() as&amp;nbsp;desired.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Dec 2017 23:10:08 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Save-script-for-Fit-Model-with-by-group/m-p/48836#M27756</guid>
      <dc:creator>cwillden</dc:creator>
      <dc:date>2017-12-18T23:10:08Z</dc:date>
    </item>
    <item>
      <title>Re: Save script for Fit Model with by group</title>
      <link>https://community.jmp.com/t5/Discussions/Save-script-for-Fit-Model-with-by-group/m-p/48851#M27762</link>
      <description>&lt;P&gt;Thanks for the tips. I am on JMP 13.2.1 Sadly the "Save-By-Group-Script"-option disappears in the moment where I use the Effect Summary to remove individual effects from one model.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind of the same problem for the scripting approach. I will have a lot of individual fit-model statements and I don't know how to put them together. Especially as we are talking of more than 20 groups which would be a lot of work that I would like to avoid.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Sebastian&lt;/P&gt;</description>
      <pubDate>Tue, 19 Dec 2017 07:05:05 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Save-script-for-Fit-Model-with-by-group/m-p/48851#M27762</guid>
      <dc:creator>shoffmeister</dc:creator>
      <dc:date>2017-12-19T07:05:05Z</dc:date>
    </item>
    <item>
      <title>Re: Save script for Fit Model with by group</title>
      <link>https://community.jmp.com/t5/Discussions/Save-script-for-Fit-Model-with-by-group/m-p/48853#M27763</link>
      <description>&lt;P&gt;Not sure exactly what workflow you envisage, but the thread implies a 'semi-automated' approach in which (someone!) refines each of the models 'by hand'.&lt;/P&gt;
&lt;P&gt;But regarding: "&lt;SPAN&gt;This is problematic because now I cannot righclick into the tables and "Save as Combined Data Table". I'm then missing the "Group"-Information.&lt;/SPAN&gt;" (and as you know already) it would be easy enough to reinstate this column programaically.&lt;/P&gt;
&lt;P&gt;Using 'Big Class', I made:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2017-12-19 at 12.08.05.png" style="width: 633px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/8754i737658AC4912D4A6/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2017-12-19 at 12.08.05.png" alt="Screen Shot 2017-12-19 at 12.08.05.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;so one could take the 'Intercept' cell as the indication that this and subsequent rows are for a new level of the 'By' group.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Dec 2017 12:15:27 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Save-script-for-Fit-Model-with-by-group/m-p/48853#M27763</guid>
      <dc:creator>ian_jmp</dc:creator>
      <dc:date>2017-12-19T12:15:27Z</dc:date>
    </item>
  </channel>
</rss>

