Hello,
I am facing 2 issues when trying tocalculate Slope and Intercept values:
- I did not find an easy way to get the Slope and intercept except the use of "Bivariate + fit line"
- Using the Bivariatein a loop seems to result in a slow execution of the code: I think that creating a table and the associated fit lile several times is very slow
My question: is there a way to get the slope and intercept without using the bivariate to get faster ?
Here is the code I use in a loop to extract the slopes and intercepts:
biv1 = Bivariate( Y( MyTab:X ), X( MyTab:Y ), Fit Line( {Line Color( "Red" )} ) );
colBox = Report( biv1 )[Number Col Box( 7 )];
beta = colBox << GetAsMatrix;
My_Slope = beta[2]; // slope
My_Intercept = beta[1]; // intercept
Close( MyTab, nosave );
);
Thanks.