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
- :
- JSL: "By Variable" Quantile Median

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

Jun 9, 2017 6:39 AM
(1183 views)

While JMP does not support a "By Varibale" quanitle, is there any work around?

For example, if I have 2 lists of data, height and age, how would I find the median height of each person of a specific age using JSL.

If I were doing it as a mean, it would look something like (However, I want a median):

Mean( :Height, :Age );

Thanks in advance!!!

1 ACCEPTED SOLUTION

Accepted Solutions

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

Jun 9, 2017 6:45 AM
(2347 views)

Solution

Select Help > Scripting Index. Now change the first list to show Functions. Select the Statistical group of functions. Select Col Quantile in the second list.

The syntax is Col Quantile( column, probability, <By column> )

Learn it once, use it forever!

5 REPLIES

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

Jun 9, 2017 6:45 AM
(2348 views)

Select Help > Scripting Index. Now change the first list to show Functions. Select the Statistical group of functions. Select Col Quantile in the second list.

The syntax is Col Quantile( column, probability, <By column> )

Learn it once, use it forever!

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

Jun 9, 2017 6:57 AM
(1175 views)

In the Index, it reads:

Col Quantile

y = Col Quantile ( xCol , p )

This above only finds medan of one variable rather than by column.

When attempthing the syntax you provided (Col Quantile( column, probability, <By column> )),I am recieving a "too many arguements" error.

Thanks!

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

Jun 9, 2017 7:20 AM
(1170 views)

apparently you are running JMP 12 or earlier. Here is a formula based upon the Semiconductor Capability sample data table that will do what you want

```
dt = Current Data Table();
mysite = :SITE;
x = Quantile( 0.5, :NPN1[dt << get rows where( :SITE == mysite )] );
x;
```

Just replace :Site with your by column, and :NPN1 with your measurement column

Jim

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

Jun 9, 2017 9:27 AM
(1159 views)

You do not have the current version of JMP.

You can seach the discussions here about similar requests and find scripts that solve this problem as a work-around.

Learn it once, use it forever!

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

Jun 9, 2017 7:05 AM
(1171 views)