<?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: How to display fit group with fit model objects? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-to-display-fit-group-with-fit-model-objects/m-p/913118#M107295</link>
    <description>&lt;P&gt;I think you can wrap your loop with Fit Group()&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

dt = Open("$SAMPLE_DATA/Semiconductor Capability.jmp");

cols = {"NPN1", "IVP1", "PNP2"};

fg = Fit Group(
	For Each({colname}, cols,
		fit = dt &amp;lt;&amp;lt; Fit Model(
			Y(Eval(colname)),
			Effects(:SITE),
			Personality("Standard Least Squares"),
			Emphasis("Effect Screening"),
			Run (1)
		);
	);
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 13 Nov 2025 14:31:13 GMT</pubDate>
    <dc:creator>jthi</dc:creator>
    <dc:date>2025-11-13T14:31:13Z</dc:date>
    <item>
      <title>How to display fit group with fit model objects?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-display-fit-group-with-fit-model-objects/m-p/913057#M107291</link>
      <description>&lt;P&gt;Hi JMP Community,&lt;/P&gt;
&lt;P&gt;I am trying to generate a fit group model report across a list of response variables, which may or may not be present in the data. When I execute this in the GUI, JMP automatically drops any response variables that are not present. However, I need to do this in a script, and when I do Fit Group for all possible Fit Models, it displays Model Specifications for each missing response variable.&lt;/P&gt;
&lt;P&gt;I tried to then fit models for existing variables in a loop, add them to a list, and then display in a Fit Group window (see script below). However, the Fit Model objects do not show in the Fit Group window whether I use Invisible or not. Weirdly, I can show the profilers across responses in the Fit Group window.&lt;/P&gt;
&lt;P&gt;I would appreciate any advice on what I might be missing!&lt;/P&gt;
&lt;P&gt;Thanks!,&lt;/P&gt;
&lt;P&gt;Joff&lt;/P&gt;
&lt;DIV&gt;&lt;SPAN&gt;responseVars = {"Logit[%TFRC+]", "Logit[Confluency]", "Log[Cell Count]"};&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;fitList = {};

// Loop over the response variables to create individual fits
For( i = 1, i &amp;lt;= N Items( responseVars ), i++,
    
    If( Contains(dt &amp;lt;&amp;lt; Get Column Names( "String" ), responseVars[i]),
		fit = Fit Model(
			Y( Column( responseVars[i] ) ),
			Effects( gRNA ),
			Personality( "Standard Least Squares" ),
			Emphasis( "Effect Screening" ),
			Run (1),
			Invisible // Prevent the window from showing
		);
		
		// Add the fit object to the list
		Insert Into( fitList, fit );
	);
);

// Create the Fit Group using the list of fits
fitGroup = Fit Group( fitList );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/DIV&gt;</description>
      <pubDate>Thu, 13 Nov 2025 13:09:03 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-display-fit-group-with-fit-model-objects/m-p/913057#M107291</guid>
      <dc:creator>JoffJones</dc:creator>
      <dc:date>2025-11-13T13:09:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to display fit group with fit model objects?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-display-fit-group-with-fit-model-objects/m-p/913081#M107293</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/48358"&gt;@JoffJones&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;I tested this on the Tablet Production sample data since i don't have your data example, but it looks like its because you aren't referring to 'gRNA' as a column, where it should be ":gRNA" including the ":". See example script below with the Tablet data that I tried.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt=current data table();

responseVars = {"Dissolution", "Logit[Confluency]", "Log[Cell Count]"};
fitList = {};

// Loop over the response variables to create individual fits
For( i = 1, i &amp;lt;= N Items( responseVars ), i++,
    
    If( Contains(dt &amp;lt;&amp;lt; Get Column Names( "String" ), responseVars[i]),
		fit = Fit Model(
			Y( Column( responseVars[i] ) ),
			Effects( :Atomizer Pressure ), //&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;This bit here doesnt work when its Effects(Atomizer Pressure)
			Personality( "Standard Least Squares" ),
			Emphasis( "Effect Screening" ),
			Run (1),
			//Invisible // Prevent the window from showing
		);
		
		// Add the fit object to the list
		Insert Into( fitList, fit );
	);
);

// Create the Fit Group using the list of fits
fitGroup = Fit Group( fitList );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 13 Nov 2025 13:52:30 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-display-fit-group-with-fit-model-objects/m-p/913081#M107293</guid>
      <dc:creator>Ben_BarrIngh</dc:creator>
      <dc:date>2025-11-13T13:52:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to display fit group with fit model objects?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-display-fit-group-with-fit-model-objects/m-p/913118#M107295</link>
      <description>&lt;P&gt;I think you can wrap your loop with Fit Group()&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

dt = Open("$SAMPLE_DATA/Semiconductor Capability.jmp");

cols = {"NPN1", "IVP1", "PNP2"};

fg = Fit Group(
	For Each({colname}, cols,
		fit = dt &amp;lt;&amp;lt; Fit Model(
			Y(Eval(colname)),
			Effects(:SITE),
			Personality("Standard Least Squares"),
			Emphasis("Effect Screening"),
			Run (1)
		);
	);
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 13 Nov 2025 14:31:13 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-display-fit-group-with-fit-model-objects/m-p/913118#M107295</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2025-11-13T14:31:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to display fit group with fit model objects?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-display-fit-group-with-fit-model-objects/m-p/913150#M107298</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/14366"&gt;@jthi&lt;/a&gt;! This is a nice solution. Do you know how I can add the Profiler and Contour Profiler across the Fit Group? My initial tries have not succeeded.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Nov 2025 15:28:13 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-display-fit-group-with-fit-model-objects/m-p/913150#M107298</guid>
      <dc:creator>JoffJones</dc:creator>
      <dc:date>2025-11-13T15:28:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to display fit group with fit model objects?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-display-fit-group-with-fit-model-objects/m-p/913171#M107305</link>
      <description>&lt;P&gt;This is a bit forced solution, but adding more models to Fit Group isn't documented and that is why I opted for this. Build list of model expressions, substitute the list fit Fit Group and evaluate that&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

dt = Open("$SAMPLE_DATA/Semiconductor Capability.jmp");

cols = {"NPN1", "IVP1", "PNP2"};
fits = {};
For Each({colname}, cols,
	fit_expr = EvalExpr(
		dt &amp;lt;&amp;lt; Fit Model(
			Y(Expr(NameExpr(AsColumn(dt, colname)))),
			Effects(:SITE),
			Personality("Standard Least Squares"),
			Emphasis("Effect Screening"),
			Run(1)
		);
	);
	Insert Into(fits, Name Expr(fit_expr));
);

fg = Eval(Substitute(fits, Expr(List), Expr(Fit Group)));
fg &amp;lt;&amp;lt; Profiler(1);
fg &amp;lt;&amp;lt; Contour Profiler(1);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 13 Nov 2025 16:01:22 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-display-fit-group-with-fit-model-objects/m-p/913171#M107305</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2025-11-13T16:01:22Z</dc:date>
    </item>
  </channel>
</rss>

