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
- :
- Re: Marking outliers in a histogram with an entry from one of other columns

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
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Marking outliers in a histogram with an entry from one of other columns

Mar 1, 2011 9:36 AM
(1748 views)

Hi,

I have a table with multiple columns say X,Y,Z. If I plot a histogram of Z and want to

mark all outliers with row entries of X instead of just row number, is this possible using JSL?

Thanks,

ASVP

I have a table with multiple columns say X,Y,Z. If I plot a histogram of Z and want to

mark all outliers with row entries of X instead of just row number, is this possible using JSL?

Thanks,

ASVP

4 REPLIES 4

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

Re: Marking outliers in a histogram with an entry from one of other columns

Do you want to do something that the built-in row labeling won't do?

For example, open Big Class.jmp from the Sample Data directory, and do a histogram of weight. You'll not there's one outlier on the top. If you right-click on that outlier and select "Row Label", you get the name LAWRENCE, the corresponding value from the name column.

This is done by assigning the Label role to the name column (which was done already for this data table). If you want to use X and Y (of your example) as labels to column Z, select X and Y, then Cols > Label/Unlabel. From then on, in every plot, you'll have points labeled by X,Y.

But I think I am misunderstanding your question. Do you want JMP to automatically label all outliers?

For example, open Big Class.jmp from the Sample Data directory, and do a histogram of weight. You'll not there's one outlier on the top. If you right-click on that outlier and select "Row Label", you get the name LAWRENCE, the corresponding value from the name column.

This is done by assigning the Label role to the name column (which was done already for this data table). If you want to use X and Y (of your example) as labels to column Z, select X and Y, then Cols > Label/Unlabel. From then on, in every plot, you'll have points labeled by X,Y.

But I think I am misunderstanding your question. Do you want JMP to automatically label all outliers?

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

Re: Marking outliers in a histogram with an entry from one of other columns

Hi Rastignac,

Thanks for your response, I can follow your procedure to manually label points but

I would like the script to do this labeling automatically for all Z values greater than a defined

threshold. Is this possible using JSL?

Regards,

ASVP

Thanks for your response, I can follow your procedure to manually label points but

I would like the script to do this labeling automatically for all Z values greater than a defined

threshold. Is this possible using JSL?

Regards,

ASVP

Highlighted
##

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

Re: Marking outliers in a histogram with an entry from one of other columns

ASVP,

What you're looking for is a combination of the For Each Row() loop and the Row State() statement.

Here's a simple JSL program, again in Big Class:

Bivariate(Y(height), X(weight));

For Each Row(

If( height > 68, Row State() = Labeled State( 1 )

)

)

This draws a scatter plot and labels anything with a height greater than 68. You can make the condition for labeling anything you want.

It works for Distribution, too, as long as the points are plotted as outliers:

Distribution(Y(height));

For Each Row(

If( height < 53, Row State() = Labeled State( 1 )

)

)

Unfortunately, I don't think there's a way to alter JMP's determination of what is an outlier in the Distribution platform.

What you're looking for is a combination of the For Each Row() loop and the Row State() statement.

Here's a simple JSL program, again in Big Class:

Bivariate(Y(height), X(weight));

For Each Row(

If( height > 68, Row State() = Labeled State( 1 )

)

)

This draws a scatter plot and labels anything with a height greater than 68. You can make the condition for labeling anything you want.

It works for Distribution, too, as long as the points are plotted as outliers:

Distribution(Y(height));

For Each Row(

If( height < 53, Row State() = Labeled State( 1 )

)

)

Unfortunately, I don't think there's a way to alter JMP's determination of what is an outlier in the Distribution platform.

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

Re: Marking outliers in a histogram with an entry from one of other columns

Thanks Rastignac, this works for me. As you have mentioned, If I use it for distribution then I can only mark the outliers as defined by JMP.

Thanks for your help.

Regards,

-ASVP

Thanks for your help.

Regards,

-ASVP