cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Don’t miss your chance to experience Discovery Summit Europe at our best available rate! Early bird registration through 31 Oct.
  • Graph Builder Toolbar streamlines interactive graphing. Creates shortcuts on Report and GraphBuilder Helpers toolbars. Download and install the extension.
  • JMP will suspend normal business operations for our Rest and Recharge Day on Friday, October 2, 2026.
    Regular business hours will resume on Monday, October 5, 2026.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
Steve_Kim
Level IV

Calculating Col Quantile by columns

Hi~

I'd like to calculate Col Quantile by Columns

on the data table

by using JMP formula as below.    (Note. Not from 'Tabulate' menu)

Do you have any idea with this?

Thanks in advance. : )

7939_Quantile by columns.jpg

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Calculating Col Quantile by columns

Brady,

Thanks for catching my typo! I meant for the character-valued case to be this:

//When By variable is character-valued:
Quantile( 0.25, (:height << get values)[loc((:sex << get values),:sex)] )

Best,

Michael

Michael Crotty
Principal Statistical Writer
Manager, Statistical Documentation
JMP Development

View solution in original post

4 REPLIES 4

Re: Calculating Col Quantile by columns

Unfortunately, the Col Quantile function does not support a By variable. However, you can use the following formulas to get around this limitation:

 

 

//Examples using $SAMPLE_DATA/Big Class.jmp:

//When By variable is character-valued:
Quantile( 0.25, (:height << get values)[loc((:sex << get values),"M")] )

//When By variable is numeric-valued:
Quantile( 0.25, (:height << get values)[loc((:age << get values) == :age)] )

 

 

Hopefully, one of these two will work for your situation!

 

Michael

Michael Crotty
Principal Statistical Writer
Manager, Statistical Documentation
JMP Development

Re: Calculating Col Quantile by columns

Using Michael's approach, you can also do the following for the character-valued scenario, to avoid having to list each group value explicitly:

 

 

Quantile(
0.25,
  (:height << get values)[Loc( :age << get values, :age[Row()] )]
)

 

 

If you need to use more than one grouping variable (say, 3 columns together, for instance) you would first concatenate the columns together to form a fourth, and use this new column as a (single) grouping column.

 

Cheers,

Brady

Re: Calculating Col Quantile by columns

Brady,

Thanks for catching my typo! I meant for the character-valued case to be this:

//When By variable is character-valued:
Quantile( 0.25, (:height << get values)[loc((:sex << get values),:sex)] )

Best,

Michael

Michael Crotty
Principal Statistical Writer
Manager, Statistical Documentation
JMP Development
Steve_Kim
Level IV

Re: Calculating Col Quantile by columns

WOW!!!!

It's marvelous solution!

and I learned 'get values' and 'location' formula from you.

Thank you so much  Michael and Brady!

Recommended Articles