The Bivariate Platform creates a separate tree structure for each of the By levels. To access the RSquare value, all that has to be done, is to point to the RSquare value as in the single Bivariate execution, but to add a subscript for which one of the RSquares outputs you want. Below is a simple modification to the script, to place the RSquare values for all 5 sites into a new data table
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/semiconductor capability.jmp" );
biv = Bivariate(
Y( :NPN1 ),
X( :PNP1 ),
Fit Spline( 100000, {Line Color( {204, 121, 41} )}, {Save Predicteds} ),
by( :site )
);
// Offset into the report object and get the RSquare value
RSquare = {};
For( i = 1, i <= N Items( biv ), i++,
Insert Into(
RSquare,
(Report( biv[i] )["Smoothing Spline Fit, lambda=100000"][Number Col Box( 1 )]
<< get)[1]
)
);
dtRSquare = New Table( "RSquareTable", New Column( "RSquares", values( RSquare ) ) );
To fully understand how to deal with the Output Display Trees created by JMP, strongly suggest that you read the section on Display Trees in the Scripting Guide
Help==>Books==>Scripting Guide
Jim