Hi there, I am trying to add the counts above a bar graph, however, I am unfamiliar with the Call BAR function and cannot seem to find any answers online. I used the code provided below.
data SAS_Test;
input var1 var2 var3 var4;
datalines;
1 . 1 1
0 0 . .
. . 1 0
1 . . .
1 0 1 .
1 1 . 1
0 0 1 0
0 1 1 0
1 1 . 1
0 1 0 1
0 1 0 1
0 1 0 1
;
run;
proc means data=SAS_Test N NMISS;
run;
proc iml;
varNames = {var1 var2 var3 var4};
use SAS_Test; /* open data set */
read all var varNames into X; /* create numeric data matrix, X */
close SAS_Test;
title "Counts of Rows That Contain Missing Values";
Count = countmiss(X,"row"); /* count missing values for each obs */
call Bar(Count); /* create bar chart */
run;
Thank you!