BookmarkSubscribeRSS Feed
Alex33
Calcite | Level 5

Hello. Could  you help me. I need programming the frequency table for example as pic 1 (attached) .

i read and watched different resources about it, but there is no information on my task

Please show me how programme it

The main file attached


pic 1.jpg
5 REPLIES 5
art297
Opal | Level 21

You'll probably have to play around with this to get exactly what you want, but I think you are looking for proc tabulate.  e.g.:

PROC TABULATE data=have;

  CLASS dose visit result;

  TABLE dose * visit ,

        result * n all='Total';

RUN;

Alex33
Calcite | Level 5

Arthur, the biggest thank you:)  the code is really working, but may be you help me in some nuances?

1. this pic of results has shifted data.pic2 I think is not accurately and those strange letters ƒSmiley Happy


The data must be look like this pic3


Please maybe you know how do this?


pic 3.jpgpic 2.jpg
Reeza
Super User

Do you have your data already summarized for such a table or do you have the raw data?

The ff are from the listing output copied to a word document. What will your final output file be, a word document, excel, pdf? 

The report shown above is a more complicated than your original question, but it's also a commonly asked question.

Here's a good link on creating such reports in SAS, I believe there's an exact example of what you're looking forward towards the end.

http://www2.sas.com/proceedings/forum2008/173-2008.pdf

Alex33
Calcite | Level 5

1. Hi, this is raw data. here full version

2. the f was copied in txt, but in word and excel too image of result

but i need is the code such as given by Arthur, but  adapted on my task and data, it's required my science work)

Alex33
Calcite | Level 5

I read your document, i did it my work:)Thanks, but maybe you suggest me , how create column not done)

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to connect to databases in SAS Viya

Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 5 replies
  • 1029 views
  • 1 like
  • 3 in conversation