Hello @LarissaW I see you what are looking for is "I'd like to count how many people are in type 1 only, in type 2 only, in type 3 only, and in Combination of 3 types..." The following code create two tables Types for the first case and combinations for the second case. The table Types answers the question how many users there in a are given type?
The table Combination answers the question in how many type's is a user present.?
data have;
input id type length;
cards;
1 1 108
1 2 54
1 3 87
2 1 46
3 1 93
4 2 29
;
proc sql;
create table Type as
Select TYPE,Count(ID) as users from have
group by Type
order by Type;
Create table combination as
Select ID, Count(Type) as TYPES from have
group by ID
order by ID;
quit;
... View more