cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
NewbietoJMP
Level I

Creating a formula to categorize values by quantile

Advice on categorizing data in quantiles as a new variable.

 

Solved - thanks!

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
Thierry_S
Super User

Re: Creating a formula to categorize values by quantile

Hi,

 

I am not aware of a built-in function that would yield what you need. Instead, I use the formula below to classify my data dynamically into quartiles.

 

If(
	:DATA <= Col Quantile( :DATA, 0.25 ), 1,
	Col Quantile( :DATA, 0.25 ) < :DATA <= 	Col Quantile( :DATA, 0.5 ), 2,
	Col Quantile( :DATA, 0.5 ) < :DATA <= 	Col Quantile( :DATA, 0.75 ), 3,
	4
)

I hope it helps.

 

Best,

 

TS

Thierry R. Sornasse

View solution in original post

Re: Creating a formula to categorize values by quantile

My approach is the same as @Thierry_S, but I used temporary variables in the formula for efficiency.

quant.PNG

View solution in original post

2 REPLIES 2
Thierry_S
Super User

Re: Creating a formula to categorize values by quantile

Hi,

 

I am not aware of a built-in function that would yield what you need. Instead, I use the formula below to classify my data dynamically into quartiles.

 

If(
	:DATA <= Col Quantile( :DATA, 0.25 ), 1,
	Col Quantile( :DATA, 0.25 ) < :DATA <= 	Col Quantile( :DATA, 0.5 ), 2,
	Col Quantile( :DATA, 0.5 ) < :DATA <= 	Col Quantile( :DATA, 0.75 ), 3,
	4
)

I hope it helps.

 

Best,

 

TS

Thierry R. Sornasse

Re: Creating a formula to categorize values by quantile

My approach is the same as @Thierry_S, but I used temporary variables in the formula for efficiency.

quant.PNG