Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SAS novice need help creating a TABLE

Status
Not open for further replies.

Embot

Technical User
May 25, 2009
1
US
Hello!

I have 45 variables called TEST (TEST1-TEST45) and 6 variables called RACE_CAT (RACE_CAT1-RACE_CAT6). There are approximately 900 observations in my dataset.
I need to create a table showing the counts of each and every test per race category; and I also need to calculate the rates of each test per 10,000 people/per race category.

Being a novice, I am having a hard time deciding between proc sql or using a multidimensional array. Do I need to calculate the totals for each variable beforehand to calculate the rates, or is there a way to do this in the process of creating the table??

I have tried to simplify my data as best as I can; all are coded as "1" if "yes" for each test or race category.

Can anyone help me??
Thanks, I am stuck and nothing seems to work!
 
Embot,

Are your RACE_CATx values mutually exclusive? Meaning, if you have a value in RACE_CAT1 is it possible to have a value in the other RACE_CATx vars?

The reason I ask is that in order to break up your data by race_cat you need to have the tests for that race_cat on its own record.

I'm presuming that each race_cat var has its own record.

You should sort your data so by race_cat and then use proc freq. This should give you nice counts of each test by race_cat as well as the total number of tests (you may need to have a total var column.

Let me know how you data is structured. Perhaps, you can post a small sample on this board.

Klaz
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top