hi, i am trying to find the % of missing in a number of character variables in monthly basis
my problem is var2 has no missing values and creates an empty table (miss_a) which is this one with headers:
month
var2
COUNT
PERCENT
I want when miss_a is empty then to add in column PERCENT = 0. However, no action to be taken if miss_a is NOT empty
i would prefer this to be in a separate step rather than in proc freq
data A;
input month $ var1 $ var2 $;
datalines;
1 2 5
1 . 8
1 . 7
1 5 2
2 7 0
3 3 2
3 2 9
3 . 2
4 7 4
4 . 5
5 6 2
5 2 2
5 . 3
5 2 2
5 . 4
6 8 2
6 2 2
run;
proc freq data=A;
table var2 / noprint missing out=miss_a;
WHERE var2="";
by month;
run;
... View more