Hi to All, I am a new SAS user and I’m trying to produce the output below using the following set of codes, where the non-numeric outcomes are missing values, A=” Not Home” and R=” Refused.” The problem I’m having is that my SAS program displays the percent, cumulative frequency, cumulative percent of the missing variables. Is there a way to exclude both missing variables (A and R) in calculating these three measures and report them as missing values as in the table below? Thank you. Lear Alfonso The FREQ Procedure Cumulative Cumulative q1 Frequency Percent Frequency Percent ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ Not home 2 . . . Refused 1 . . . 1 3 42.86 3 42.86 2 3 42.86 6 85.71 3 1 14.29 7 100.00 Frequency Missing = 3 DATA survey; MISSING A R; INPUT id q1 $; CARDS; 8401 2 8402 A 8403 1 8404 1 8405 2 8406 3 8407 A 8408 1 8408 R 8410 2 ; RUN; Data surveyf; set survey; if q1='a' then q1='.'; if q1='r' then q1='.'; *; proc format; value $qf 'A' = 'Not Home' 'R' = 'Refused'; format q1 $qf.; run; proc freq data=surveyf; format q1 $qf.; tables q1 / missprint; RUN; quit; My SAS output The FREQ Procedure q1 Frequency Percent Cumulative Frequency Cumulative Percent 1 3 30.00 3 30.00 2 3 30.00 6 60.00 3 1 10.00 7 70.00 Not Home 2 20.00 9 90.00 Refused 1 10.00 10 100.00
... View more