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: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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