The CAUSALGRAPH Procedure

PROC CAUSALGRAPH Statement

  • PROC CAUSALGRAPH <options>;

The PROC CAUSALGRAPH statement invokes the procedure. The options listed in Table 1 are available in the PROC CAUSALGRAPH statement.

Table 1: Options Available in the PROC CAUSALGRAPH Statement

Option Description
Analysis Options
COMMON Requests adjustment sets common to all models
IMAP Requests conditional independence assumptions
INMODEL= Specifies a data set that contains one or more causal models
LIST Requests possible identification criteria
METHOD= Specifies the method to use for identification
MINIMAL Requests only minimal adjustment sets
NOLIST Excludes the construction of possible identification criteria
Output Options
COMPACT Suppresses the display of unused variables
CYCLES Displays directed cycles
DISCONNECTED Suppresses warnings for models that contain disjoint DAGs
MAXLIST= Specifies the maximum number of identification criteria to print
MAXSIZE= Specifies the maximum size of constructed adjustment sets
NOPRINT Suppresses display of all output
NOSORT Requests an unsorted list of adjustment sets
NTHREADS= Specifies the maximum number of processing threads
ORDERMODELS Orders the model output displays according to the model labels
OUTMODEL= Creates an output data set that contains the causal models
PSUMMARY Displays only the identification analysis summary


COMMON <(ONLY)>

requests adjustment sets common to all models. If you specify the COMMON option, the adjustment sets common to all models are computed in addition to the adjustment sets specific to each model. You can specify the COMMON(ONLY) option to compute only the adjustment sets common to all models. The COMMON option is ignored if you specify METHOD=IV.

COMPACT

suppresses the display of unused variables in a table. By default, the procedure prints one column for every variable when adjustment sets or conditional instrumental variables are displayed. Specify this option if you want to print only the columns corresponding to variables that appear in at least one adjustment set or conditioning set.

CYCLES <=n | =ALL>

displays directed cycles in each model that you specify by using a MODEL statement. By default, the procedure issues an error if any model that you specify in a MODEL statement contains a directed cycle. If you specify this option, the procedure does not issue an error. This is useful if you need to investigate and revise a large causal model that contains directed cycles.

By default, the procedure displays only one directed cycle (if such a cycle exists) for each model. You can change the number of cycles that are printed for each model by specifying the optional argument. For a positive integer n, CYCLES=n prints at most n directed cycles. To print all cycles, specify CYCLES=ALL.

This option has no effect for a model that contains no directed cycles.

DISCONNECTED
DISCONNECT

suppresses warnings for models that contain disjoint directed acyclic graphs (DAGs). By default, the procedure issues a warning if a model that you specify in a MODEL statement is not weakly connected (that is, if the model consists of two or more disjoint DAGs). Although the procedure can still continue to analyze disconnected models, this warning provides a safeguard against accidental misspecification. You can use this option to turn off the warning. This option does not have any effect for a model that is connected.

IMAP <=GLOBAL | LOCAL>

requests a list of the conditional independence properties (an independence map) that are encoded by each causal model. For more information about conditional independence properties in causal models, see the section Statistical Properties of Causal Models.

GLOBAL

produces a list of global Markov properties. For a causal model that is encoded in a DAG, the global Markov property corresponds to d-separation (Koller and Friedman 2009).

LOCAL

produces a list of local Markov properties. For a causal model that is encoded in a DAG, the local Markov property is the set of nodes that are jointly independent of a given node, conditional on the parents of that node (Koller and Friedman 2009).

By default, IMAP=LOCAL.

When a conditional independence property includes an unmeasured variable, the implications of that property (for example, zero partial correlation) cannot be tested in a data set. Such properties are still included in the independence map as an implication of a causal model.

INMODEL=SAS-data-set

specifies a data set that contains one or more causal models to be analyzed. A typical use of the INMODEL= option is when you want to reuse one or more causal models that you saved by specifying the OUTMODEL= option in a previous invocation of PROC CAUSALGRAPH. Instead of using a MODEL statement to specify the model, you use the INMODEL= option to input the model specification that was saved from the previous run.

Sometimes, you might create an INMODEL= data set by modifying an existing OUTMODEL= data set. However, editing and modifying OUTMODEL= data sets require a good understanding of the formats and contents of the OUTMODEL= data sets. This process could be error-prone for novice users. For more information about the format of INMODEL= or OUTMODEL= data sets, see the section INMODEL= and OUTMODEL= Data Sets.

You can combine the INMODEL= option with one or more MODEL statements. When you specify the INMODEL= option, every model that is defined in the specified SAS-data-set is loaded into PROC CAUSALGRAPH before any MODEL statements are processed. This means that you can use the REFMODEL= option in the MODEL statement to refer to models in the SAS-data-set.

LIST

requests the possible identification criteria for each model. The type of the identification criteria that are constructed depends on the value that you specify in the METHOD= option. If METHOD=ADJUSTMENT or BACKDOOR, a list of adjustment sets is produced for each model. If METHOD=IV, a list of instrumental variables is produced for each model.

The LIST option is used by default if you specify an IDENTIFY statement but no TESTID statement. Otherwise, the NOLIST option is used.

You cannot specify both the LIST and NOLIST options.

MAXLIST=n | ALL

specifies the maximum number of identification criteria to be printed when you specify the LIST option. By default, the procedure prints up to 100 entries. To change the maximum number of entries to be printed, you can specify a positive integer n. To print all entries, specify MAXLIST=ALL.

MAXSIZE=n | MIN

specifies the maximum size of the adjustment sets to be constructed when you specify the LIST option. By default, the procedure prints all valid adjustment sets without regard to the size of the set. You can specify the MAXSIZE= option with a positive integer n to change the maximum size of the sets to be printed. To see only those adjustment sets with the smallest size, specify MAXSIZE=MIN.

The MAXSIZE=MIN option is not the same as the MINIMAL option. Every adjustment set that has the smallest size is minimal, but not every minimal adjustment set necessarily has the smallest size.

The MAXSIZE= option is ignored if you specify METHOD=IV.

METHOD=ADJUSTMENT | ANCESTOR | BACKDOOR | POUTCOME | PTREATMENT | IV

specifies the method to use for identifying a causal effect. For more information about identifying causal effects, see the section Causal Effect Identification. You can specify the following values:

ADJUSTMENT

specifies the constructive backdoor criterion (Van der Zander, Liśkiewicz, and Textor 2014). The constructive backdoor criterion is equivalent to the adjustment criterion (Shpitser, VanderWeele, and Robins 2010). You can use this criterion to find all valid adjustment sets that consist of observed variables only. This method contains the backdoor (METHOD=BACKDOOR), parents-of-treatment (METHOD=PTREATMENT), parents-of-outcome (METHOD=POUTCOME), and joint ancestor (METHOD=ANCESTOR) criteria as special cases.

ANCESTOR

specifies the joint ancestor criterion. When you have a single treatment variable and a single outcome variable, the set of all common ancestors of those two variables is a valid adjustment set (Elwert 2013). You can use the joint ancestor criterion in PROC CAUSALGRAPH with any number of treatment and outcome variables to find all valid adjustment sets that consist exclusively of nodes that are ancestors of at least one treatment and at least one outcome variable.

This method is a special case of the constructive backdoor criterion. This means that every adjustment set that satisfies the joint ancestor criterion also satisfies the constructive backdoor criterion.

BACKDOOR

specifies the backdoor adjustment criterion (Pearl 2009b). The backdoor adjustment criterion is similar to the constructive backdoor criterion (METHOD=ADJUSTMENT) in that it finds valid adjustment sets that consist of observed variables only. The backdoor criterion is stronger than the constructive backdoor criterion, so it is computationally more efficient than the constructive backdoor criterion, although it might not find every valid adjustment set. The appeal of the backdoor criterion is that it has an intuitive interpretation and is more widely known (Pearl 2009b).

This method is a special case of the constructive backdoor criterion. This means that every adjustment set that satisfies the backdoor adjustment criterion also satisfies the constructive backdoor criterion.

POUTCOME

specifies the parents-of-outcome criterion. This criterion is similar to the parents-of-treatment (METHOD=PTREATMENT) criterion except that it uses the parents of the outcome variables. When you have a single treatment variable and a single outcome variable, there are certain conditions under which you can form a valid adjustment set by including all nodes that are parents of the outcome but that do not lie on a causal path (Elwert 2013). You can use the parents-of-outcome criterion in PROC CAUSALGRAPH with any number of treatment and outcome variables to find all valid adjustment sets that consist exclusively of parents of outcome variables.

This method is a special case of the constructive backdoor criterion. This means that every adjustment set that satisfies the parents-of-outcome criterion also satisfies the constructive backdoor criterion.

PTREATMENT

specifies the parents-of-treatment criterion (Elwert 2013). The set that contains all parents of all treatment variables is a valid adjustment set. (In the case of multiple treatment variables, a parent of treatment that is itself a treatment variable is not considered to be part of the adjustment set.) The parents-of-treatment criterion in PROC CAUSALGRAPH uses this sufficient condition as a starting point and finds all valid adjustment sets that consist exclusively of parents of treatment variables.

This method is a special case of the constructive backdoor criterion. This means that every adjustment set that satisfies the parents-of-treatment criterion also satisfies the constructive backdoor criterion.

IV

specifies the ancestral instrument criterion (Van der Zander, Textor, and Liśkiewicz 2015). This method finds all traditional and ancestral instruments for a causal model. If you use this criterion with the LIST option, the procedure first checks to see whether each observed variable can be used as a classical instrument (that is, the variable is a valid instrument without conditioning on any other variables). If the observed variable is not a classical instrument, then the procedure searches for a conditioning set that instrumentalizes the observed variable.

In order to use the ancestral instrument criterion, every model that you specify by using a MODEL statement must contain a single treatment variable and a single outcome variable that are directly connected by an edge.

By default, METHOD=ADJUSTMENT.

MINIMAL
MIN

requests a list of only minimal adjustment sets when you specify the LIST option. A minimal adjustment set is a set for which no proper subset is also a valid adjustment set. If you specify prescribed adjustment variables in the IDENTIFY statement, then the minimal condition is checked only among those sets that contain the prescribed variables.

The MINIMAL option is not the same as the MAXSIZE=MIN option. Every adjustment set that has the smallest size is minimal, but not every minimal adjustment set necessarily has the smallest size.

The MINIMAL option is ignored if you specify METHOD=IV.

NOLIST

excludes the construction of possible identification criteria. If you specify this option, the procedure does not construct any identification criteria for any model. This option is used by default if you specify a TESTID statement or if you do not specify an IDENTIFY statement.

You cannot specify both the LIST and NOLIST options.

NOPRINT

suppresses all displayed output.

NOSORT

requests an unsorted list of adjustment sets when METHOD=ADJUSTMENT or BACKDOOR. By default, the procedure prints adjustment sets in order of increasing set size. The NOSORT option enables more efficient output because the sets do not need to be sorted. This can be especially useful for large models when you have a larger number of adjustment sets. For more information about options that improve the performance of PROC CAUSALGRAPH, see the section Time Requirements.

The NOSORT option is ignored if you specify METHOD=IV.

NTHREADS=n

specifies the maximum number of simultaneous computational threads available to the procedure. By default, the procedure uses the values of the THREADS and CPUCOUNT system variables to determine the number of computational threads. Multithreading is available when you specify more than one MODEL statement. There is no performance benefit in using a value of n greater than the number of models. To disable multithreading within the procedure, specify NTHREADS=1.

ORDERMODELS

prints the model results in alphabetical order by model label. However, the default behavior is to print the model results in the order in which the models appear in the input specifications.

OUTMODEL=SAS-data-set

creates an output data set that contains the causal model specifications. An OUTMODEL= data set can be used as an input INMODEL= data set in a subsequent analysis by PROC CAUSALGRAPH.

PSUMMARY

displays only the summary of the causal effect identification analysis. Graphics are also produced if you explicitly specified them in a PATHDIAGRAM statement.

Last updated: December 09, 2022