That's right, you're digging deeper inside the Parameter Estimates and won't find the RSquare down there. The Summary of Fit sits on the same level in tree, so use a separate call instead of go down and back up again.
I do not think it is possible to get parameters and summary of fit in the same table with one command. Make two tables and then there are several ways to bring the data together.
Try this:
//Stack with multiple series option
dt_stacked = Data Table( "Example-2.jmp" ) << Stack(
columns( :height, :weight, :height1, :weight1, :height2, :weight2 ),
Source Label Column( "Label" ),
Stacked Data Column( "Data" ),
Number of Series( 2 )
);
//Fit all slopes
biv = dt_stacked << Bivariate( Y( :Data 2 ), X( :Data ), Group by( :Temp1 2 ), Fit line( 1 ) );
//Make into data tables
slopetable = Report( biv )[Outline Box( "Parameter Estimates" )][1] << make combined data table;
R2table = Report( biv )[Outline Box( "Summary of Fit" )][1] << make combined data table;
// Split table to get slope and intercept on the same row, then add a column with R2-values
results = slopetable << Split(
Split By( :Term ),
Split( :Estimate ),
Group( :X, :Y, :Temp1 2 ),
Remaining Columns( Drop All )
);
results << New Column( "R2",
numeric,
set values(
Column( R2table, "Column 2" )[R2table << get rows where(
Column( R2table, "Column 1" )[] == "RSquare"
)]
)
);
// Close intermediate windows
Close( dt_stacked, slopetable, R2table, no save );