Fandom

Scratchpad

Proc format

215,674pages on
this wiki
Add New Page
Discuss this page0 Share

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

Simple

Generic:

 proc format; 
   value FORMAT1 1= 'LABEL1' 2 = 'LABEL2';
 run;
 
 proc freq;
   tables VAR1*VAR2;
   format VAR1 FORMAT1.;
 run;

Example:

 proc format; 
   value SEXES 1= 'MALE' 2 = 'FEMALE';
 run;
 
 proc freq;
   tables SEX*EDUCATION;
   by COMPANY;
   format SEX SEXES.;
 run;

This would label the categorical variable SEX with the format SEXES: "MALE" and "FEMALE". These would appear on the table produced by proc freq instead of "1" or "2".

Also on Fandom

Random wikia