When fitting a model in JMP, it must create an equation to predict the behavior of the response variable from the parameters. Where can that equation be found?
Thanks,Matt
Which platform are you using? If you are using Fit Model, under the red triangle you will find options to display the formula, or to save the prediction formula to the data table. This is for the standard least squres. Different personalities will have options for doing similar things.
Under Fit Y by X there is an option under the red triangles to save predicteds.
The Partitioning platform allows for the "Save Predicteds".
If you can provide which modeling platform you are using, and you can not find the red triangle option for the predicted formula, repost to the discussion group with the specifics and I am sure the answers will be provided.
Ah, excellent, thanks again. Using the formula from the new column works well.
Thanks very much, Jim. I'm using Fit Model and Show Prediction Expression appears to be what I'm looking for. Is it possible to copy this out as text? I have a number of expressions I need to implement in Python and they're all fairly complex, but none of the options seem to allow copy/paste.
Matt
Matt,
The "Show Prediction Expression" displays an image(Picture Box()), not a text field. However, it is a simple step, to generate the Prediction Formula and to capture it. See the script below
Names Default To Here( 1 ); dt = Open( "$SAMPLE_DATA\Big Class.jmp" ); fm = dt << Fit Model( Y( :height ), Effects( :weight ), Personality( "Standard Least Squares" ), Emphasis( "Effect Leverage" ), Run( :height << {Summary of Fit( 1 ), Analysis of Variance( 1 ), Parameter Estimates( 1 ), Plot Actual by Predicted( 1 ), Plot Residual by Predicted( 1 ), Plot Effect Leverage( 1 )} ) ); fm << prediction formula; equation = Char( Column( dt, N Cols( dt ) ) << get formula ); Show( equation );
Hi Jim,
Unfortunately, my experience with JMP is entirely interactive (not programmatic), and I couldn't make this work. I tried replacing "$SAMPLE_DATA\Big Class.jmp" with my file, and everything inside Fit Model () with the script for my model, but that wasn't enough. There really isn't any way to get the expression(s) as text within the JMP GUI without writing a separate script?
m100psi: If you are running JMP Pro, you can publish your prediction equation to the Formula Depot and then from the Formula Depot hot spot, choose the "Generate Python Code" option to write the scoring code needed for Python.
Thanks, Peter, I will try this next. I'm running JMP Pro 11.1.1.
The Formula Depot is a JMP 13 feature.....sorry