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 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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
  • 4119 views
  • 0 likes
  • 2 in conversation