BookmarkSubscribeRSS Feed
DmytroYermak
Lapis Lazuli | Level 10

Hi all,

 

Could you please say how to implement Proc Freq for the following case. I have the table below:

 

and I need to build the following statistics (frequencies):

 

 

What shoult be the format of PROC FREQ? Or should it be PROC TABULATE? I am looking for a decision in several steps but can it be sorted out in one?

 

Thank you. 

3 REPLIES 3
Astounding
PROC Star

How does Visit2Finding get utilized in constructing the table?

 

PROC FREQ can give you something quick and dirty, not at all fancy and only similar to what you asked for:

 

proc freq data=have;

tables examination * visit1Finding * cohort / missing list;

run;

 

You might add Visit2Finding in there somewhere, depending on what it is supposed to be used for.

 

For anything fancier, you probably need to switch to PROC TABULATE.

DmytroYermak
Lapis Lazuli | Level 10

I have received the following table:

 

but badly need exactly the one below (. Is it possible to use Proc Report and what is the algorythm for it?

 

ballardw
Super User

It is best to post example data in a form that can be used for demonstrating code. Instructions here: https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat... will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the {i} icon or attached as text to show exactly what you have and that we can test code against.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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.

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
  • 6318 views
  • 0 likes
  • 3 in conversation