Hello @brownster,
You can also use PROC CORR to compute a correlation matrix from indicator variables defined as 1 if the original variable is missing, else 0, because the Pearson correlation coefficient of such variables equals the phi coefficient (a measure of association that you would normally compute with PROC FREQ).
Example using SASHELP.HEART:
/* Create table with information about missing levels of variables */
ods output nlevels=nlev;
proc freq data=sashelp.heart nlevels;
tables _all_ / noprint;
run;
/* Create indicator variables (1 if missing, else 0) for each variable with one or more missings */
proc sql noprint;
select cat('missing(',trim(tablevar),') as ',tablevar), tablevar
into :indvars separated by ', ', :indvarlist separated by ' '
from nlev
where nmisslevels;
create table want as
select &indvars
from sashelp.heart;
quit;
/* Compute phi coefficients (=Pearson correl. coeff.) for all pairs of indicator variables */
proc corr data=want;
var &indvarlist;
run;
... View more