The CAUSALMED Procedure

Syntax: CAUSALMED Procedure

The following statements are available in the CAUSALMED procedure:

  • PROC CAUSALMED <options>;

  • CLASS variables <(options)> …<variable<(options)>> </ global-options>;

  • MODEL outcome <*censor(list)> <(outcome-options)> =effects </ model-options>;

  • MEDIATOR mediator <(med-options)> =treatment <(treat-options)>;

  • COVAR effects;

  • BOOTSTRAP <options>;

  • BY variables;

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

  • FREQ variable;

  • STD variable=value <variable=value …>;

  • WEIGHT variable;

Together with the PROC CAUSALMED statement, the MODEL and MEDIATOR statements are essential to causal mediation analysis. The MODEL statement provides the model for the outcome variable; you use this statement to specify the effects of the treatment, the mediator, and possibly their interactions on the outcome variable. The MEDIATOR statement provides the model for the mediator variable; you use this statement to specify the effect of the treatment on the mediator variable.

In addition to the MODEL and MEDIATOR statements, you use the COVAR statement to specify the effects of confounding covariates. Because the assumption of no unmeasured confounding covariates is critical to the validity of causal mediation analysis for observational data, it is important that you specify all important covariate effects in this statement.

The CLASS statement, if provided, must precede the MODEL, MEDIATOR, and COVAR statements. The CLASS statement names the classification variables to be used in the analysis.

The following sections describe the PROC CAUSALMED statement and then describe the other statements in alphabetical order.

Last updated: December 09, 2022