The CAUSALMED Procedure

EVALUATE Statement

  • EVALUATE 'label' assignment <assignment …> </ options>;

You use the EVALUATE statement to specify variable levels or values for evaluating various effects. In the assignments, you can specify one or more of the following variable levels:

  • the control and treatment levels for computing all effects

  • the mediator level for computing the controlled direct effect

  • the covariate levels for evaluating various conditional causal effects

Each assignment is of the form

var-key=value-key

where var-key specifies a variable and value-key is either its numerical value, its character value, or a keyword (such as MEAN) that generates a value from the variable.

Because of interaction effects and nonlinear models, computation of causal mediation effects usually depend on the values or levels of the treatment, control, mediator, or covariate levels. PROC CAUSALMED assigns values or levels to these variables automatically when it performs a default mediation effect analysis. By setting these default variable levels, you obtain "overall" measures of causal mediation and related effects. For more information about how PROC CAUSALMED sets the default values of levels, see the section Evaluating Causal Mediation Effects.

However, to address your particular research questions more directly, you can provide EVALUATE statements with specific variable levels to evaluate mediation and related effects. Specifying covariate levels, the treatment level (of the treatment variable), or the control level (of the treatment variable) changes the estimates of all mediation effects and decompositions. Specifying the controlled level of the mediator variable does not change the estimates of the total effect (TE), the natural direct effect (NDE), or the natural indirect effect (NIE). But it does change the estimates of the controlled direct effect (CDE) and the reference interaction (IRF).

You can provide as many EVALUATE statements as you want. Each statement specifies an assignment scheme that defines the mediation effects and produces a summary of effects, decompositions of effects (if requested), and percentage decompositions of effects (if requested).

To distinguish the results that are produced by different EVALUATE statements, you can specify a distinct label in each EVALUATE statement. A maximum of 256 characters is allowed for each label. This label is displayed in the output tables.

For example, suppose that C1 and C2 are continuous covariates in the mediation model and you want to evaluate the mediation effects at C1=5 and C2=10. You can request that by providing the following statement:

evaluate 'Set C1=5 C2=10' C1=5 C2=10;

In this statement, the quoted string, 'Set C1=5 C2=10', labels the set of assignments for evaluating the mediation effects and is followed by the assignments, C1=5 and C2=10.

If you want to evaluate the mediation effects conditioned on a different set of covariate values, you can add another EVALUATE statement. For example,

evaluate 'Scheme 1 -- C1=5  C2=10' C1=5  C2=10;
evaluate 'Scheme 2 -- C1=10 C2=5'  C1=10 C2=5;

Meaningful labels for the EVALUATE statements are highly recommended in practice.

If you use '_Default' as the label, PROC CAUSALMED overrides the default variable levels for evaluating mediation effects. For example, the following statement generates only one set of mediation effect output tables, which replace the default tables:

evaluate '_Default'  C1=5 C2=10;   /* Overrides the default assignment scheme */

In addition to the use of fixed value assignments (such as C1=5 in the preceding examples), PROC CAUSALMED provides several ways to specify the var-key and the value-key in an assignment.

You can use the following var-keys in an assignment:

_CONTROL | _A0 | _T0
varname(CONTROL)

specifies the control level of the treatment variable, where varname represents the actual treatment variable name.

covariate-name

specifies a covariate by using its actual variable name for covariate-name.

_MEDIATOR | _MSTAR
varname

specifies the controlled level of the mediator variable, where varname represents the actual mediator variable name.

_TREATMENT | _A1 | _T1
varname(TREATMENT)

specifies the treatment level of the treatment variable, where varname represents the actual treatment variable name.

In all the preceding examples, actual variable names have served as var-keys and numerical values have served as value-keys. The following statements show examples of assignments that specify keywords for var-keys:

evaluate 'Scheme 3' _treatment=max _control=mean _mediator=last C1=mode;
evaluate 'Scheme 4' _A1=0 _A0=1 _mstar=10 C1='Boys';
evaluate 'Scheme 5' _A1=.5 _A0=-.5 _mediator=0 C1=2;

You can use the following value-keys in an assignment:

'level'

assigns the level of the corresponding classification variable that is specified in the var-key, where level represents an actual character level of the variable.

FIRST

assigns the first level of the corresponding classification variable that is specified in the var-key.

LAST

assigns the last level of the corresponding classification variable that is specified in the var-key.

MAX

assigns the maximum variable value (denoted as max) of the corresponding numerical variable that is specified in the var-key. If you assign this value-key to both the treatment and control levels of the treatment variable, then the treatment level is max+0.5 and the control level is max–0.5. If you assign this value-key to the treatment level but not the control level, then the treatment level is max and the control level is max–1. If you assign this value-key to the control level but not the treatment level, then the control level is max and the treatment level is max+1.

MEAN

assigns the mean variable value (denoted as mean) of the corresponding numerical variable that is specified in the var-key. If you assign this value-key to both the treatment and control levels of the treatment variable, then the treatment level is mean+0.5 and the control level is mean–0.5. If you assign this value-key to the treatment level but not the control level, then the treatment level is mean and the control level is mean–1. If you assign this value-key to the control level but not the treatment level, then the control level is mean and the treatment level is mean+1.

MIN

assigns the minimum variable value (denoted as min) of the corresponding numerical variable that is specified in the var-key. If you assign this value-key to both the treatment and control levels of the treatment variable, then the treatment level is min+0.5 and the control level is min–0.5. If you assign this value-key to the treatment level but not the control level, then the treatment level is min and the control level is min–1. If you assign this value-key to the control level but not the treatment level, then the control level is min and the treatment level is min+1.

MODE

assigns the modal level of the corresponding CLASS variable that is specified in the var-key. In multimodal situations, the modal classes are averaged in a particular way. For more information about the averaging process of modal classes, see the section Evaluating Causal Mediation Effects.

value<(SD)>

assigns the numerical value in the assignment, where value represents a fixed number. If you use the SD option, the measurement scale of the numerical value refers to the measurement scale of the standardized variable. Hence, with the SD option the actual assigned value is

m plus sans-serif-italic value asterisk s

where m and s are the sample mean and standard deviation, respectively, of the corresponding variable that is specified in the var-key of the assignment.

The following statements show examples of assignments that use different types of keywords for value-keys:

evaluate 'Evaluation 6' _treatment=.5(SD) _control=-0.5(SD) _mediator=min
                        C1=mode;
evaluate 'Evaluation 7' _A1=first _A0=last _mediator=mean C1='Boys';

After specifying the assignments in an EVALUATE statement, you can use one or more of the following options to control the displays of mediation effects and decompositions that are generated by the EVALUATE statement:

CLABEL='clabel'
CLABEL=clabel

specifies a short content-label for the mediation effects that are generated by the EVALUATE statement. The clabel is used to label the corresponding set of tables in the output. Only the first 20 characters of clabel is used. If you do not specify this option, the first 20 characters of the label, which you specify in the beginning of the EVALUATE statement, is used as clabel.

DECOMP<=i>

specifies the type of decompositions requested, where i is between 2 and 4, representing two-, three-, or four-way decompositions, respectively. If you specify the DECOMP= options in the PROC CAUSALMED statement and in an EVALUATE statement, the DECOMP option in the EVALUATE statement is used for evaluating the requested effects.

NODECOMP

suppresses the display of all decomposition results for the specified evaluation scheme of mediation effects. Only the summary table of effects is shown. This option also overrides the DECOMP= option in the same EVALUATE statement.

For more information about how variable levels are related to the interpretation of causal mediation effects, see the section Evaluating Causal Mediation Effects. For illustrations of the use of the EVALUATE statement, see Example 38.2 and Example 38.3.

Last updated: December 09, 2022