BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
peiy5920
Calcite | Level 5

Hello,

 

Codes for find 20%, 40%, 60%, and 80% percentile for the variable PCR_URINE_COMBINED.
proc univariate data=PROJECT.PAPER_CRIC; var PCR_URINE_COMBINED; output out=perc pctlpre=P_ pctlpts= 20 40 60 80; run;

 

But how to define tertiles, I did not figure out. Can someone help me? Thank you.
proc univariate data=PROJECT.PAPER_CRIC; var PCR_URINE_COMBINED; output out=tert tertpre=T_ tertpts= 30 60 90; run;

1 ACCEPTED SOLUTION

Accepted Solutions
PaigeMiller
Diamond | Level 26

use the option in PROC UNIVARIATE

 

pctlpts=33.33 66.67

 
--
Paige Miller

View solution in original post

3 REPLIES 3
PaigeMiller
Diamond | Level 26

use the option in PROC UNIVARIATE

 

pctlpts=33.33 66.67

 
--
Paige Miller
peiy5920
Calcite | Level 5

Thank you so much  for your help.

peiy5920
Calcite | Level 5
I already knew 2 points of the variable according to 33.33 and 66.67, then how can I create 3 parts of this variables, that is from continuous variable to categorical variable. Can you show me some example codes? Thanks.

sas-innovate-white.png

🚨 Early Bird Rate Extended!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9.

 

Lock in the best rate now before the price increases on April 1.

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 4507 views
  • 0 likes
  • 2 in conversation