User-Defined Formats and the PLM Procedure

The PLM procedure does not support a FORMAT statement because it operates without an input data set, and also because changing the format properties of variables could alter the interpretation of parameter estimates, thus creating a dissonance with variable properties in effect when the item store was created. Instead, user-defined formats that are applied to classification variables when the item store is created are saved to the store and are by default reloaded by the PLM procedure. When the PLM procedure loads a format, notes are issued to the log.

You can change the load behavior for formats with the user-defined FORMAT= option in the PROC PLM statement.

User-defined formats do not need to be supplied in a new SAS session. However, when a user-defined format with the same name as a stored format exists and the default FORMAT=RELOAD option is in effect, the format definition loaded from the item store replaces the format currently in effect.

In the following statements, the format AFORM is created and applied to the variable a in the PROC GLM step. This format definition is transferred to the item store sasuser.glm through the STORE statement.

proc format;
  value aform 1='One' 2='Two' 3='Three';
run;
proc glm data=sp;
   format a aform.;
   class block a b;
   model y = block a b x;
   store sasuser.glm;
   weight x;
run;

The following statements replace the format definition for aform in the PROC FORMAT step. The PLM step then reloads the AFORM format and thereby restores its original state.

proc format;
  value aform 1='Un' 2='Deux' 3='Trois';
run;
proc plm source=sasuser.glm;
   show class;
   score data=sp out=plmout lcl lclm ucl uclm;
run;

The following notes, issued by the PLM procedure, inform you that the procedure loaded the format, the format already existed, and the existing format was replaced:

   NOTE: The format AFORM was loaded from item store SASUSER.GLM.
   NOTE: Format AFORM is already on the library.
   NOTE: Format AFORM has been output.


After the PROC PLM run, the definition that is in effect for the format AFORM corresponds to the following SAS statements:

proc format;
  value aform 1='One' 2='Two' 3='Three';
run;