turn on suggestions

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

Showing results for

- JMP User Community
- :
- Discussions
- :
- Extract slope and intercept from Summary of Fit

Topic Options

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

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

Aug 2, 2017 8:46 AM
(1202 views)

Hi all,

I need to create a script that extracts slope and intercept from Summary of Fit and then uses them to calculate a cutoff value for my variable.

The user will first imput filters and remove outliers. When satisfied with the data points, he/she presses a button and get the slope and interecept as shown in Summary of fit, to be used for the cutoff calculation.

Can anybody help me?

1 ACCEPTED SOLUTION

Accepted Solutions

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

Aug 2, 2017 8:53 AM
(2310 views)

Solution

@francescaz :

In order to get the data from summary of fit , please refer to here

As for definition of cutoff point , can you define the conditions or share what you have ?

Best

Uday

Best

Uday

Uday

4 REPLIES

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

Aug 2, 2017 8:53 AM
(2311 views)

@francescaz :

In order to get the data from summary of fit , please refer to here

As for definition of cutoff point , can you define the conditions or share what you have ?

Best

Uday

Best

Uday

Uday

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

Aug 4, 2017 12:00 AM
(1147 views)

Thank you for the link, it's very usefult.

The cutoff is a predefined concentration of analyte, so once the intercept and slope are known, it's easily determined. I'd like to add it to my y as a specification limit but the ultimate goal would be to fill in an xml template with slope and interecept. Is there any way to fill in xml files with jmp?

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

Aug 4, 2017 3:41 AM
(1137 views)

Yes. If the XML template exists, you can use 'LoadTextFile()', make the changes and insertions you require using JSL, then use 'SaveTextFile()'. Look in 'Help > Scripting Index' for details of these JSL expressions.

I'm sure you would get more speciifc guidance if you are able to provide an example.

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

Aug 7, 2017 2:14 AM
(1108 views)

here is my code so far.

It works as is, just I'd like to get both slope and intercept from Num Col Box(7) and I can't figure out what's wrong with int = num(word(1, eq2)). It returns no number, so I'm getting the intercept from Outline Box(2).

I attach the template xml.

```
dt = Current Data Table();
biv = dt << Bivariate(Y(:variable1), X(:Conc A), Fit Line());
rbiv=report(biv);
eq1=rbiv[Outline Box(2)][1, 1] << get text;
eq2=rbiv[Number Col Box(7)] << get text;
slope = num(word(2, eq2));
int = num(word(3, eq1)); //I'd like to get both numebers from Number Col Box (7), but if set int = num(word(1, eq2)) I get nothing.
Cutoff = int+slope*2.5;
Eval(
Eval Expr(
:variable1 << Set Property(
"Spec Limits",
{LSL( Expr( Cutoff ) ), USL( Expr( . ) ), Target( Expr( . ) ),
Show Limits( 1 )}
)
)
);
```