I have a data set and I have 36 counties and 15 CCOs. Would like to use proc freq efficiently. I want a count of covid contacts by county and for the requisite CCO (Coordinated Care Organization). Several counties utilize the same CCO so that is why there are fewer CCOs than counties. This is how I renamed the generic CCO1.....CCO15 fields Proc Sql noprint;
CREATE TABLE SASCDC_2.Arias_skinny_dataset_for_viz AS
SELECT DISTINCT Contact_Person_ID,
Monitoring_Status,
Status,
ZIP_Code,
County_,
Designation,
CCO_1 AS Advanced_Health label='Advanced_Health',
CCO_2 AS Allcare_CCO label='Allcare_CCO',
CCO_3 AS Cascade_Health_Alliance label='Cascade_Health_Alliance',
CCO_4 AS Columbia_Pacific_CCO label='Columbia_Pacific_CCO',
CCO_5 AS EOCCO_ label='EOCCO_',
CCO_6 AS Health_Share_Oregon label='Health_Share_Oregon',
CCO_7 AS Intercommunity_Health_Network label='Intercommunity_Health_Network',
CCO_8 AS Jackson_Care_Connect label='Jackson_Care_Connect',
CCO_9 AS Pac_Source_Central_OR label='Pac_Source_Central_OR',
CCO_10 AS Pac_Source_Columbia_Gorge label='Pac_Source_Columbia_Gorge',
CCO_11 AS Pac_Source_Lane label='Pac_Source_Lane',
CCO_12 AS Pac_Source_Marion_Polk label='Pac_Source_Marion_Polk',
CCO_13 AS Trillium_Comm_Health_Plan label='Trillium_Comm_Health_Plan',
CCO_14 AS Umpqua_Health_Alliance label='Umpqua_Health_Alliance',
CCO_15 AS Yamhill_Comm_Care_Org label='Yamhill_Comm_Care_Org'
FROM SASCDC_2.Arias_contact_zip_cco_zip
WHERE Monitoring_Status ne "Marked for deduplication";
quit; So the proc freq looks like this (with only a few CCos listed) proc freq Data = SASCDC_2.Arias_skinny_dataset_for_viz order=data;;
Tables County_ * Advanced_Health Allcare_CCO Cascade_Health_Alliance Columbia_Pacific_CCO EOCCO_;
run; But the problem is I don't want a table for each CCO. I want the count of contacts occurring in a specific county:CCO cell. So ideally I would like my resulting table to look like (illustrative) Advanced Health CCO …………………. Health Share Oregon …. Yamhill Comm Health Baker 23 0 0 Hood River 0 100 0 Multnomah 0 1200 0 Polk 0 0 200 …. Washington 0 1550 0 How can I create that table using proc freq? Or can I. This table is a beta version so I don't want to spent a lot of time (this time around - like proc report or tabulate). This is to give leadership a new slice of information and to assess how much value there is. Thank you. wlierman
... View more