Hi all,
I am using the fit model tool to create fit equations for a certain subset of data that I would then like to apply back to a larger set and measure the RMS value between the predicted and actual value. I have 231 unique samples (labeled as RunID) and within each sample I have 2 different channels that I am evaluating. This leads to 436 total fit equations. I use the Fit Model tool to create the 436 equations and I can manually go through each output and save each of the equations to a column in the data table. I then copy and paste the formula for that column back into my larger data set and measure the "predicted vs actual". I would like to not manually insert the equations and it seems like there are a couple of solutions that have been posted here and here, but I can't seem to get either of these to work.
Here is what I have:
JMP Version: 16
I am trying to predict the Zoffset from the Xoffset and Yoffset positions, so I should be getting an equation for each "RunID/Channel" combination.
When I run the script below I get this:

I was just copying the approaches linked above, but there must be somethign different in my code that does not quite line up.
obj = Fit Model(
Y( :ZOffset ),
By( :RunID, :Channel Only Location ),
Effects(
:XOffset, :XOffset * :XOffset, :XOffset * :XOffset * :XOffset, :YOffset,
:YOffset * :YOffset, :YOffset * :YOffset * :YOffset, :XOffset * :YOffset
),
Personality( "Standard Least Squares" ),
Emphasis( "Minimal Report" ),
Run(
:ZOffset << {Summary of Fit( 1 ), Analysis of Variance( 1 ),
Parameter Estimates( 1 ), Lack of Fit( 0 ), Scaled Estimates( 0 ),
Plot Actual by Predicted( 0 ), Plot Regression( 0 ),
Plot Residual by Predicted( 0 ), Plot Studentized Residuals( 0 ),
Plot Effect Leverage( 0 ), Plot Residual by Normal Quantiles( 0 ),
Box Cox Y Transformation( 0 )}
)
);
obj << (Fit[1] << Save Prediction Formula);