I am putting together a table of Preferred contact method (email, text, phone) from a survey of contacts for contact tracing. Then I wish to express the results by the binary result 'Contact Successful'. This is the code
Proc sql noprint;
CREATE TABLE SASCDC_2.Contact_Reached_by_RE AS
SELECT Contact_Attempt_Successful,
Preferred_Method_of_Contact,
Count(American_Indian_and_Alaska_Nativ) AS _American_Indian_Alaska_Native,
Count(Asian) AS _Asian,
Count(Black_or_African_American) AS _Black__or__African_American,
Count(Hispanic_or_Latino_a_x) AS _Hispanic_or_Latino_a_x,
Count(Middle_Eastern_North_African) AS _Middle_Eastern__North_African,
Count(Native_Hawaiian_and_Pacific_Isla) AS _Native_Hawaiian_and_Pacific_Isl,
Count(White) AS _White
FROM SASCDC_2.Arias_age_groupings
Group By Contact_Attempt_Successful, Preferred_Method_of_Contact;
quit;
The output doesn't look too bad but I would like to insert a subtotal by preferred_method_of_contact for each contact_attempt_successful
The results look like this (this is an abbreviated table):
Contact_Successful Preferred_Method AIAN Asian Hispanic White
No Email 6 11 65 158
No Phone 17 29 1303 467
Would like a subtotal here ========> 23 40 1368 625
Yes Email 16 66 181 656
Yes Phone 39 112 1799 1145
Would like a subtotal here ========> 55 178 1980 1801
Also is there a trick to position the Yes responses first then the No responses below
them?
Thank you for your assistance.
wlierman
... View more