The CAUSALGRAPH Procedure

INMODEL= and OUTMODEL= Data Sets

The OUTMODEL= option creates an output data set that contains the model specifications for the current analysis by PROC CAUSALGRAPH. An OUTMODEL= data set can be used as an input INMODEL= data set in a subsequent analysis by the procedure. Similarly, the INMODEL= data set is usually created in a previous run of PROC CAUSALGRAPH in which the OUTMODEL= option was specified. Together, the INMODEL= and OUTMODEL= options are useful if you want to reuse a causal diagram for multiple analyses. For example, you might want to analyze a causal model when different sets of variables are unmeasured, or you might want to store a common base model for use with the REFMODEL= option.

It is important to realize that INMODEL= and OUTMODEL= data sets contain only the information about the specification of the causal model(s). These data sets do not store any information about treatment variables, outcome variables, or unmeasured variables.

You can alter an existing OUTMODEL= data set in the DATA step to create the INMODEL= data set that describes a modified model. However, editing and modifying OUTMODEL= data sets require a good understanding of the format and contents of the OUTMODEL= data sets and can be error-prone.

The OUTMODEL= data set is of TYPE=CALISMDL. For more information about this type of data set, see the section OUTMODEL= or OUTRAM= Data Set in ChapterĀ 33, The CALIS Procedure. PROC CAUSALGRAPH uses the following variables to represent the causal model(s):

  • the numeric variable _MDLNUM_ for model numbers

  • the character variable _MDLNAM_ for model labels

  • the character variable _TYPE_, which takes various values that indicate the type of model specification

  • the character variable _NAME_, which indicates the model type

  • the character variable _VAR1_, which is the name of the first variable in the specification

  • the character variable _VAR2_, which is the name of the second variable in the specification

Each observation (record) of the OUTMODEL= data set contains a piece of information about the model specification. Depending on the type of the specification that is indicated by the value of the _TYPE_ variable, the meanings of _NAME_, _VAR1_, and _VAR2_ differ. The following table summarizes the meanings of the _NAME_, _VAR1_, and _VAR2_ fields for different values of the _TYPE_ variable:

_TYPE_= Description _NAME_ _VAR1_ _VAR2_
MDLTYPE Model type PATH
LEFT Path coefficient (empty) Child variable Parent variable
RIGHT Path coefficient (empty) Parent variable Child variable
PCOV (Partial) covariance (empty) First variable Second variable

For data sets that PROC CAUSALGRAPH uses, the value of the _NAME_ variable is always PATH for an observation for which _TYPE_=MDLTYPE.

Last updated: December 09, 2022