Published on :
Statistical INTERNAL_CREATION

Example 1 for PROC CAUSALGRAPH

This code is also available in: Deutsch Español Français
This SAS© script uses the `PROC CAUSALGRAPH` procedure to define and analyze a causal graphical model. It specifies causal relationships between different variables such as age, parity, education, PFAS exposure, duration of breastfeeding, employment, BMI, alcohol, and smoking. The objective is to identify the causal effect of 'PFAS' on 'Duration', taking into account unmeasured variables ('Alcohol', 'Smoking'). The procedure allows determining the necessary adjustment sets to estimate this causal effect in an unbiased manner.
Data Analysis

Type : INTERNAL_CREATION


The script does not read external data or create a SAS dataset. It defines a theoretical causal graphical model and its relationships within the `CAUSALGRAPH` procedure. Data corresponding to these variables would be presumed to exist for subsequent analysis with other SAS procedures (e.g., `PROC CAUSALMED`) that would use this graphical model.

1 Code Block
PROC CAUSALGRAPH
Explanation :
This block defines a causal graphical model named 'Timm17TwoLatent'. The `model` clause specifies the direct causal relationships between variables (e.g., 'Age' affects 'Parity', 'PFAS', 'Education'). The `identify` clause indicates the causal effect of interest to be estimated, here from 'PFAS' to 'Duration'. Finally, `unmeasured` declares variables like 'Alcohol' and 'Smoking' as unmeasured, which is crucial for the correct calculation of adjustment sets by the procedure to avoid bias.
Copied!
1PROC CAUSALGRAPH;
2 model "Timm17TwoLatent"
3 Age ==> Parity PFAS Education,
4 Parity ==> PrevBF Duration PFAS,
5 PrevBF ==> PFAS Duration,
6 PFAS ==> Duration,
7 Education ==> Duration Employment PFAS BMI Alcohol Smoking,
8 Employment ==> Duration PFAS BMI Alcohol Smoking,
9 BMI Alcohol Smoking ==> Duration;
10 identify PFAS ==> Duration;
11 unmeasured Alcohol Smoking;
12RUN;
This material is provided "as is" by We Are Cas. There are no warranties, expressed or implied, as to merchantability or fitness for a particular purpose regarding the materials or code contained herein. We Are Cas is not responsible for errors in this material as it now exists or will exist, nor does We Are Cas provide technical support for it.
Copyright Info : S A S S A M P L E L I B R A R Y