Is there a complete list of SAS procedures that support multilabel formats? Today I'm interested in SURVEYMEANS, but tomorrow it could be another one.
"Multilabel formats are available for use only in the MEANS, SUMMARY, TABULATE, and REPORT procedures. "
https://blogs.sas.com/content/sgf/2016/12/16/creating-and-using-multilabel-formats/
"Multilabel formats are available for use only in the MEANS, SUMMARY, TABULATE, and REPORT procedures. "
https://blogs.sas.com/content/sgf/2016/12/16/creating-and-using-multilabel-formats/
You can use a procedure like PROC SUMMARY to expand your data using a MLF and output a data set used as input to another procedure.
/*Expand data using MULTILABEL formats*/
proc format;
value $sex(multilabel notsorted)
'M' = 'Male'
'F' = 'Female'
'X' = 'Unk'
'M','F' = 'Both'
'X','F','M' = 'Total'
;
quit;
data class;
_obs_ + 1;
set sashelp.class(keep=sex);
if _n_ eq 5 then sex='X';
retain _sentinal1 ' ';
set sashelp.class(drop=sex);
retain _sentinal2 ' ';
run;
proc print;
run;
proc summary data=class nway completetypes missing;
by _obs_;
class sex / order=data mlf preloadfmt;
format sex $Sex.;
output out=expand(drop=_type_ _SENT: where=(_freq_ gt 0)) idgroup(out(_sentinal1--_sentinal2)=) / levels;
run;
proc print;
run;
I think that you might try creating CLASS or DOMAIN variables for each level of your multilabel format for use with Survey procs. This is likely to involve sending the output to datasets and filtering/merging data sets to get desired result.
Yes, I can do that. I was hoping to avoid that extra step.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.