The CAUSALMED Procedure
The CLASS statement names one or more classification variables to be used as explanatory variables in the analysis.
The CLASS statement must precede the COVAR, MEDIATOR, and MODEL statements. Most options can be specified either as individual variable options or as global-options. You can specify options for each variable by enclosing the options in parentheses after the variable name. You can also specify global-options for the CLASS statement by placing them after a slash (/). Global-options are applied to all the variables specified in the CLASS statement. However, individual CLASS variable options override the global-options. Unless otherwise indicated, you can specify the following values for either an option or a global-option:
-
CPREFIX=n
uses at most the first n characters of a CLASS variable name in creating names for the corresponding design variables. The default is
, where f is the formatted length of the CLASS variable.
-
DESCENDING
DESC
reverses the sort order of the CLASS variables. If both the DESCENDING and ORDER= options are specified, PROC CAUSALMED orders the categories according to the ORDER= option and then reverses that order.
-
LPREFIX=n
uses at most the first n characters of a CLASS variable name in creating labels for the corresponding design variables. The default is
, where f is the formatted length of the CLASS variable.
-
MISSING
treats missing values (blanks for character variables and ., ._, .A, …, .Z for numeric variables) as valid values for the CLASS variables.
-
ORDER=DATA | FORMATTED | FREQ | INTERNAL
-
specifies the sort order for the levels of CLASS variables. This ordering determines which parameters in the model correspond to each level in the data.
You can specify the following values:
- DATA
sorts the levels in their order of appearance in the input data set.
- FORMATTED
sorts the levels by external formatted values, except for numeric variables that have no explicit format, which are sorted by their unformatted (internal) values. The sort order is machine-dependent.
- FREQ
sorts the levels by descending frequency count. Levels that have more observations come earlier in the order.
- INTERNAL
sorts the levels by an unformatted value. The sort order is machine-dependent.
By default, ORDER=FORMATTED. For more information about sort order, see the chapter on the SORT procedure in the Base SAS Procedures Guide and the discussion of BY-group processing in SAS Programmers Guide: Essentials.
-
REF='level' | FIRST | LAST
-
specifies a level of the CLASS variable to be put at the end of the list of levels. This level thus corresponds to the reference level in the usual interpretation of the linear estimates that have a singular parameterization.
You can specify the following values:
- 'level'
specifies the level of the variable to use as the reference level. Specify the formatted value of the variable if a format is assigned. You cannot specify 'level' as a global-option.
- FIRST
designates the first ordered level as the reference level.
- LAST
designates the last ordered level as the reference level.
By default, REF=LAST.
-
TRUNCATE<=n>
specifies the length (n) of variable values to use in determining the CLASS variable levels. The default is to use the full formatted length of the CLASS variable. If you specify this option without the length n, the first 16 characters of the formatted values are used. The TRUNCATE option is available only as a global-option.
Last updated: December 09, 2022