Here is the example from the Scripting Index that shows how to Save Prediction Formula
![txnelson_0-1659401558503.png txnelson_0-1659401558503.png](https://community.jmp.com/t5/image/serverpage/image-id/44474i34D4008507EAFA59/image-dimensions/789x351?v=v2)
And here is an example using a slight modification to your code, and using the Semiconductor Capability sample data table
Names Default To Here( 1 );
dt =
// Open Data Table: semiconductor capability.jmp
// → Data Table( "semiconductor capability" )
Open( "$SAMPLE_DATA/semiconductor capability.jmp" );
P = Partial Least Squares(
Y( :PNP1 ),
X( :Name( "NPN1" ), :Name( "NPN2" ), :Name( "NPN3" ), ),
Validation Method( None, Initial Number of Factors( 15 ) ),
Fit( Method( NIPALS ), Number of Factors( 15 ) ),
);
P << obj << (Fit[1] << Save Prediction Formula);
Jim