cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • New to JMP? Join us Sept. 23-24 for the Early User Edition of Discovery Summit, tailor-made for new users. Register now for free!
  • Use World Cup data to build models, explore spatial relationships, and create informative visualizations in JMP. Register. July 17, 2 pm US Eastern Time.
  • Your voice matters! Tell us how you prefer to receive JMP updates, so we can tailor our communication to your needs. Take short survey.

Discussions

Solve problems, and share tips and tricks with other JMP users.
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

Recommended Articles