I think that there is a more elegant and robust approach. See the end of this example for the approach of which I am thinking.
Names Default to Here( 1 );
// JMP Pro 16.2
// start with example of a model script
model = Expr(
Fit Group(
Fit Model(
Y( :"SILICA (%)"n ),
Effects( :ELONG, :"HARDNESS(+/-0.2)"n ),
Personality( "Standard Least Squares" ),
Emphasis( "Minimal Report" ),
Run(
Profiler(
1,
Confidence Intervals( 1 ),
Term Value(
ELONG( 417.5, Lock( 0 ), Show( 1 ) ),
"HARDNESS(+/-0.2)"n( 69.775, Lock( 0 ), Show( 1 ) )
)
),
:"SILICA (%)"n << {Summary of Fit( 1 ), Analysis of Variance( 1 ),
Parameter Estimates( 1 ), Effect Tests( 0 ), Effect Details( 0 ),
Lack of Fit( 0 ), Scaled Estimates( 0 ), Plot Actual by Predicted( 1 ),
Plot Regression( 0 ), Plot Residual by Predicted( 0 ),
Plot Studentized Residuals( 1 ), Plot Effect Leverage( 0 ),
Plot Residual by Normal Quantiles( 1 ), Box Cox Y Transformation( 0 ),
Press( 1 )}
)
),
Fit Model(
Y( :SILANE Value ),
Effects(
:"ABRASION For example (%)"n, :MODULUS, :ELONG, :"HARDNESS(+/-0.2)"n,
:MODULUS * :ELONG
),
Personality( "Standard Least Squares" ),
Emphasis( "Minimal Report" ),
Run(
Profiler(
1,
Confidence Intervals( 1 ),
Term Value(
"ABRASION For example (%)"n( 133.1, Lock( 0 ), Show( 1 ) ),
MODULUS( 1255, Lock( 0 ), Show( 1 ) ),
ELONG( 417.5, Lock( 0 ), Show( 1 ) ),
"HARDNESS(+/-0.2)"n( 69.775, Lock( 0 ), Show( 1 ) )
)
),
:SILANE Value << {Summary of Fit( 1 ), Analysis of Variance( 1 ),
Parameter Estimates( 1 ), Effect Tests( 0 ), Effect Details( 0 ),
Lack of Fit( 0 ), Scaled Estimates( 0 ), Plot Actual by Predicted( 1 ),
Plot Regression( 0 ), Plot Residual by Predicted( 0 ),
Plot Studentized Residuals( 1 ), Plot Effect Leverage( 0 ),
Plot Residual by Normal Quantiles( 1 ), Box Cox Y Transformation( 0 ),
Press( 1 )}
)
),
Fit Model(
Y( :SULFUR ),
Effects( :ELONG ),
Personality( "Standard Least Squares" ),
Emphasis( "Minimal Report" ),
Run(
Profiler(
1,
Confidence Intervals( 1 ),
Term Value( ELONG( 417.5, Lock( 0 ), Show( 1 ) ) )
),
:SULFUR << {Summary of Fit( 1 ), Analysis of Variance( 1 ),
Parameter Estimates( 1 ), Effect Tests( 0 ), Effect Details( 0 ),
Lack of Fit( 0 ), Scaled Estimates( 0 ), Plot Actual by Predicted( 1 ),
Plot Regression( 0 ), Plot Residual by Predicted( 0 ),
Plot Studentized Residuals( 1 ), Plot Effect Leverage( 0 ),
Plot Residual by Normal Quantiles( 1 ), Box Cox Y Transformation( 0 ),
Press( 1 )}
)
),
<<{Profiler(
1,
Confidence Intervals( 1 ),
Term Value(
ELONG( 417.5, Lock( 0 ), Show( 1 ) ),
"HARDNESS(+/-0.2)"n( 69.775, Lock( 0 ), Show( 1 ) ),
"ABRASION For example (%)"n( 133.1, Lock( 0 ), Show( 1 ) ),
MODULUS( 1255, Lock( 0 ), Show( 1 ) )
)
)}
);
);
// last argument is in-line message send for Profiler
last = N Arg( model );
profilerExpr = Arg( model, last );
// unwrap Send() and its list argument
profilerExpr = Arg( profilerExpr, 1 )[1];
// find term values
termVals = Associative Array();
termExpr = Arg( profilerExpr, 3 );
nArgs = N Arg( termExpr );
For( i = 1, i <= nArgs, i++,
Insert Into( termVals,
Char( Head( Arg( termExpr, i ) ) ),
Arg( Arg( termExpr, i ), 1 )
)
);
// use resulting dictionary for term values
Show( termVals );