Causal DAG — smoking & lung cancer
Classic epidemiology DAG with age as confounder and tar as mediator.
View example and source Edit in StudioNative causal directed-acyclic graphs for epidemiology and inference. Declare nodes by role — `exposure`, `outcome`, `confounder`, `mediator`, `unobserved` — and the engine colour-codes them and lays out the diagram so the causal story reads left-to-right. Bidirected (`---`) edges render as dashed double-headed arcs for unmeasured association.

Most users come to Causal DAG from DAGitty or Hand-drawn causal diagrams. flowss runs this engine in the browser — no install, shareable via URL, exportable to PNG / SVG / PDF / source.
exposure E "Smoking"
outcome O "Lung cancer"
confounder C "Age"
E -> O
C -> E
C -> OPaste this in the Studio code pane to see Causal DAG render live. The full grammar is at the upstream-docs link above.
Classic epidemiology DAG with age as confounder and tar as mediator.
View example and source Edit in StudioWhy randomisation breaks the confounder path.
View example and source Edit in StudioEffect of education on income with confounders and mediator.
View example and source Edit in StudioDiet effect on CV outcomes with BMI as mediator.
View example and source Edit in StudioTest-negative design with healthcare seeking as confounder.
View example and source Edit in StudioSequential mediators between exposure and outcome.
View example and source Edit in Studiocausaldag · ← Browse all engines · Quick-start guide