cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
The Discovery Summit 2025 Call for Content is open! Submit an abstract today to present at our premier analytics conference.
Choose Language Hide Translation Bar
View Original Published Thread

how to get the slope/intercept values of orthogonal regression from a Bivariate Fit Chart in JSL?

zxu11
Level III

In the following JSL script, I tried to get the values of slope and intercept of the orthogonal regression directly from the Bivariate Fit chart, but it always gives me error :-(... Any hint here?

biv = dt << Bivariate( Y( :New ), X( :Ref ), Fit Orthogonal( 1 ) );

rbiv = biv << Report;

slopebox = rbiv[Outline Box( 1 ),If Box(3), Outline Box(3),Table Box( 4 ), Number Col Box( 12 )];

slope = slopebox<< get(1);
1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User


Re: how to get the slope/intercept values of orthogonal regression from a Bivariate Fit Chart in JSL?

This should work

names default to here(1);
dt = current data table();
biv = dt << Bivariate( Y( :New ), X( :Ref ), Fit Orthogonal( 1 ) );

rbiv = biv << Report;

slopebox = rbiv["Orthogonal Fit Ratio=1.000",NumberColBox( "Slope" )];

slope = (slopebox << get)[1];

P.S.  In the future, when you enter JSL into a Discussion item, please use the JSL icon at the top of the entry window.  It makes for a far more readable entry.

Jim

View solution in original post

2 REPLIES 2
txnelson
Super User


Re: how to get the slope/intercept values of orthogonal regression from a Bivariate Fit Chart in JSL?

This should work

names default to here(1);
dt = current data table();
biv = dt << Bivariate( Y( :New ), X( :Ref ), Fit Orthogonal( 1 ) );

rbiv = biv << Report;

slopebox = rbiv["Orthogonal Fit Ratio=1.000",NumberColBox( "Slope" )];

slope = (slopebox << get)[1];

P.S.  In the future, when you enter JSL into a Discussion item, please use the JSL icon at the top of the entry window.  It makes for a far more readable entry.

Jim
zxu11
Level III


Re: how to get the slope/intercept values of orthogonal regression from a Bivariate Fit Chart in JSL?

YES! It works perfect! Thanks!