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
yanee
Level III

Save residual by using jmp script

Hi,

 

I created a script to run a correlation.  there are 2 fit line : a) linear correlation fit , b) 1:1 fit.

I need to save the residual from the 1:1 fit (fit special). how do I do that with the JMP script ?

 

 

plot = data table("Correlation_Raw")<< Bivariate(
Y( :NewTester ),
X( :RefTester ),
Fit Line( {Confid Curves Fit( 1 ), Line Color( {212, 73, 88} )} ),
Fit Special( Intercept( 0 ), Slope( 1 ), {Line Color( {61, 174, 70} )}),
By( :Label )
);
bivRep = plot << Report;

 

 

Thanks.

Yanee

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: Save residual by using jmp script

Here is a simple modification of your script that will save residuals for both of your fits.

plot = data table("Correlation_Raw")<< Bivariate(
Y( :NewTester ),
X( :RefTester ),
Fit Line( {Confid Curves Fit( 1 ), Line Color( {212, 73, 88} )} ),
Fit Special( Intercept( 0 ), Slope( 1 ), {Line Color( {61, 174, 70} )}),
By( :Label )
);
bivRep = plot << Report;
plot << (Curve[1] << Save Residuals);
plot << (Curve[2] << Save Residuals);

See the Scripting Index for other examples

     Help==>Scripting Index==>Bivariate==>Save Residuals

Jim

View solution in original post

2 REPLIES 2
txnelson
Super User

Re: Save residual by using jmp script

Here is a simple modification of your script that will save residuals for both of your fits.

plot = data table("Correlation_Raw")<< Bivariate(
Y( :NewTester ),
X( :RefTester ),
Fit Line( {Confid Curves Fit( 1 ), Line Color( {212, 73, 88} )} ),
Fit Special( Intercept( 0 ), Slope( 1 ), {Line Color( {61, 174, 70} )}),
By( :Label )
);
bivRep = plot << Report;
plot << (Curve[1] << Save Residuals);
plot << (Curve[2] << Save Residuals);

See the Scripting Index for other examples

     Help==>Scripting Index==>Bivariate==>Save Residuals

Jim
yanee
Level III

Re: Save residual by using jmp script

thanks ...