Trying to pull constants, slope and intercept, from the linear fit formula across multiple plots. I am using Big Class as an example. I make a Bi-variate plot across different parameters, next I make a linear fit for each plot and create a new column for the predicted values. I want to take the Linear Fit formula constants and create two new columns that hold the slope and intercept from that formula for each row. Here is what I have so far, I am stuck where I save the formula from the linear fit, but can't quite pull the formula values into a column, I think I want to use the expr() function but I am not sure, any help would be greatly appreciated, thanks in advance.
dt = Current Data Table(); //Big Class active
biv = Bivariate(
Y( :height ),
X( :weight ),
by( :sex, :age ),
Fit Line( {Line Color( {212, 73, 88} )}, save predicteds ),
);
biv << (curve[1] << save predicteds);
Column( N Cols( dt ) ) << set name( "Linear Fit" );
myFormula = Column(dt, "Linear Fit") << getFormula;
// Stuck here want to use the "Linear Fit" formula and create a column for the slope in the formula
// and another for the intercept pulled from the predicted formula in "Linear Fit"
dt << NewColumn("Slope", Numeric, Continous, expr(left(myFormula,5)));
dt << NewColumn("Intercept", Numeric, Continous, );