Skip to content
Graphviz (DOT) templates

Path Analysis (SEM)

Structural equation model with mediator and standardised paths.

Template previewGraphviz (DOT)
Rendering…

Make it your own.

digraph sem {
  rankdir=LR;
  graph [bgcolor=transparent];
  node [shape=ellipse, style=filled, fillcolor="#dbeafe", fontname=Inter, fontsize=10];

  SES [label="SES"];
  Stress [label="Stress"];
  Sleep [label="Sleep"];
  Health [label="Health", fillcolor="#dcfce7"];

  SES -> Stress [label="-0.42**"];
  Stress -> Sleep [label="-0.31**"];
  Sleep -> Health [label="0.27**"];
  SES -> Health [label="0.18*"];
  Stress -> Health [label="-0.22**"];

  e1 [label="ε1", shape=plain]; e1 -> Stress [style=dashed];
  e2 [label="ε2", shape=plain]; e2 -> Sleep  [style=dashed];
  e3 [label="ε3", shape=plain]; e3 -> Health [style=dashed];
}