cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP will suspend normal business operations for our Winter Holiday beginning on Wednesday, Dec. 24, 2025, at 5:00 p.m. ET (2:00 p.m. ET for JMP Accounts Receivable).
    Regular business hours will resume at 9:00 a.m. ET on Friday, Jan. 2, 2026.
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.

Discussions

Solve problems, and share tips and tricks with other JMP users.
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 ...

Recommended Articles