Skip to content
Science templates

Factorial experiment — main effects and interactions

Design a two-factor experiment with every factor combination represented and replication allocated at the experimental-unit level. An interaction means the effect of one factor depends on the level of another.

Template previewScience
Rendering…

What this template contains

Source
24 lines

Make it your own.

{
  "nodes": [
    { "id": "a", "type": "rounded", "label": "Factor A levels", "x": 40, "y": 40, "width": 150, "height": 104, "fill": "#ede9fe", "stroke": "#6d28d9" },
    { "id": "b", "type": "rounded", "label": "Factor B levels", "x": 40, "y": 360, "width": 150, "height": 104, "fill": "#ede9fe", "stroke": "#6d28d9" },
    { "id": "cross", "type": "rounded", "label": "Cross all factor combinations", "x": 215, "y": 200, "width": 150, "height": 104, "fill": "#fef3c7", "stroke": "#b45309" },
    { "id": "rand", "type": "octagon", "label": "Randomise independent units", "x": 390, "y": 200, "width": 150, "height": 104, "fill": "#e0f2fe", "stroke": "#0369a1" },
    { "id": "obs", "type": "card", "label": "Measured response", "x": 565, "y": 200, "width": 150, "height": 104, "fill": "#ccfbf1", "stroke": "#0f766e" },
    { "id": "main", "type": "rounded", "label": "Main-effect estimates", "x": 740, "y": 40, "width": 150, "height": 104, "fill": "#fef3c7", "stroke": "#b45309" },
    { "id": "inter", "type": "rounded", "label": "Interaction estimate", "x": 740, "y": 360, "width": 150, "height": 104, "fill": "#fef3c7", "stroke": "#b45309" },
    { "id": "diag", "type": "octagon", "label": "Residual / variance checks", "x": 565, "y": 520, "width": 150, "height": 104, "fill": "#e0f2fe", "stroke": "#0369a1" },
    { "id": "res", "type": "rounded", "label": "Conditional effects and uncertainty", "x": 915, "y": 200, "width": 150, "height": 104, "fill": "#fce7f3", "stroke": "#be185d" }
  ],
  "edges": [
    { "id": "e0", "source": "a", "target": "cross", "label": "combine" },
    { "id": "e1", "source": "b", "target": "cross", "label": "combine" },
    { "id": "e2", "source": "cross", "target": "rand", "label": "allocate" },
    { "id": "e3", "source": "rand", "target": "obs", "label": "observe" },
    { "id": "e4", "source": "obs", "target": "main", "label": "estimate" },
    { "id": "e5", "source": "obs", "target": "inter", "label": "estimate" },
    { "id": "e6", "source": "diag", "target": "res", "label": "model adequacy" },
    { "id": "e7", "source": "main", "target": "res", "label": "context" },
    { "id": "e8", "source": "inter", "target": "res", "label": "effect dependence" }
  ]
}