l" class="quarto-xref"><span>23</span></a>, we can define a DAG by listing all the direct causal connections between nodes. Using the simulation notation to illustrate, here is a simple simulation of the influence of a medical <code>drug</code> on <code>mortality</code>, where the medical drug is presumed to reduce mortality, but where the only patients prescribed the drug are those who are unhealthy.</p>
<div class="cell">
<div class="sourceCode cell-code" id="annotated-cell-1"><pre class="sourceCode r cod