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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How many have each kind of test?

Status
Not open for further replies.

irinnew

Technical User
Mar 19, 2005
81
US
Hi everybody,

I have a file of patients who had many lab tests. However I am just interested in tests “A”, “B”, “C”, “D” and “E”

I need to know how many patients have each kind of test. How can I do it?

Thank you in advance!

Irin
 
Code:
proc freq data=mytest(where=(test_type in('A','B','C','D','E')));
  table test_type /missing;
run;

That what you're after?
 
try this just for checking.just a 2 way freq.
proc freq data = mytest; tables patient*test_type /missing ;
where test_type in ('A','B','C','D','E');run;
 
It's more efficient to put the where clause as a datset option than as a statement, it prevents the whole record being read in before the where clause is tested.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top