- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hello
What is the difference between using "MLF" and using "MLF preloadfmt" ?
As I know MLF option is telling SAS that format of class variable is multi label.
What is the purpose of preloadfmt?
IS always preloadfmt going together with MLF?
But as I see MLF can go alone without preloadfmt
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Ronein
Multilabel formatting allows an observation to be included in multiple rows or categories -> with the MLF option (and if the procedure supports it like PROC MEANS for example), you activate multilabel format processing when a multilabel format is assigned to a class variable.
Preloadfmt is quite different. The objective is to take into account all modalities of a variable. For example, if you run a PROC TABULATE on a dataset that contains data for female only, and that you apply this option as well as the PRINTMISS option, you will tell SAS to display all modalities (male, female) and not only observed modalities. Another example could be countries. If your dataset contains observations for 2 countries, but the format specifies values for all countries over the world, you will be able to build a report with all modalities, even if they have actually no observation in the dataset.
E.g.
proc format;
value sex (multilabel) 0="Male" 1="Female" 0,1 = "All";
run;
data have;
input sex;
format sex sex.;
datalines;
0
0
0
;
run;
title "Without preloadfmt option";
proc tabulate data=have;
class sex;
table sex*n='';
run;
title "With preloadfmt option";
proc tabulate data=have;
class sex / preloadfmt;
table sex*n='' / printmiss;
run;
title "With preloadfmt and mlf option";
proc tabulate data=have;
class sex / preloadfmt mlf;
table sex*n='' / printmiss;
run;
Does that make sense ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Is Preloadfmt always go together with printmiss ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Ronein
Yes, PRELOADFMT must be used with:
- PRINTMISS option in PROC TABULATE to include all the modalities of formats in the summary table, even if in case of a zero frequency
- EXCLUSIVE option if you want to restrict the display of some modalities.
Best,