Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

- JMP User Community
- :
- Discussions
- :
- Save residual by using jmp script

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Created:
Mar 6, 2020 3:50 PM
| Last Modified: Mar 7, 2020 9:01 AM
(1023 views)

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

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

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

2 REPLIES 2

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

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

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: Save residual by using jmp script

thanks ...

Article Labels

There are no labels assigned to this post.