Hi JMP Community,
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.
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.
I would appreciate any advice on what I might be missing!
Thanks!,
Joff
responseVars = {"Logit[%TFRC+]", "Logit[Confluency]", "Log[Cell Count]"};
fitList = {};
// Loop over the response variables to create individual fits
For( i = 1, i <= N Items( responseVars ), i++,
If( Contains(dt << 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 );