@elaraai/e3-ui 1.0.103 → 1.0.104
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/allocation/functions.d.ts +2 -1
- package/dist/src/allocation/functions.d.ts.map +1 -1
- package/dist/src/allocation/functions.js +3 -2
- package/dist/src/allocation/functions.js.map +1 -1
- package/dist/src/allocation/index.d.ts +120 -1
- package/dist/src/allocation/index.d.ts.map +1 -1
- package/dist/src/allocation/index.js +24 -4
- package/dist/src/allocation/index.js.map +1 -1
- package/dist/src/bind/data-indexed.d.ts +25 -4
- package/dist/src/bind/data-indexed.d.ts.map +1 -1
- package/dist/src/bind/data-indexed.js +58 -7
- package/dist/src/bind/data-indexed.js.map +1 -1
- package/dist/src/bind/data.d.ts +12 -14
- package/dist/src/bind/data.d.ts.map +1 -1
- package/dist/src/bind/data.js +11 -11
- package/dist/src/bind/data.js.map +1 -1
- package/dist/src/bind/func.d.ts +7 -2
- package/dist/src/bind/func.d.ts.map +1 -1
- package/dist/src/bind/func.js +10 -3
- package/dist/src/bind/func.js.map +1 -1
- package/dist/src/calendar/index.d.ts +148 -1
- package/dist/src/calendar/index.d.ts.map +1 -1
- package/dist/src/calendar/index.js +55 -5
- package/dist/src/calendar/index.js.map +1 -1
- package/dist/src/flowchart/canvas.d.ts +32 -14
- package/dist/src/flowchart/canvas.d.ts.map +1 -1
- package/dist/src/flowchart/canvas.js +21 -6
- package/dist/src/flowchart/canvas.js.map +1 -1
- package/dist/src/flowchart/details.d.ts +469 -0
- package/dist/src/flowchart/details.d.ts.map +1 -0
- package/dist/src/flowchart/details.js +1035 -0
- package/dist/src/flowchart/details.js.map +1 -0
- package/dist/src/flowchart/flowchart.d.ts +16 -72
- package/dist/src/flowchart/flowchart.d.ts.map +1 -1
- package/dist/src/flowchart/flowchart.js +10 -1
- package/dist/src/flowchart/flowchart.js.map +1 -1
- package/dist/src/flowchart/index.d.ts +282 -251
- package/dist/src/flowchart/index.d.ts.map +1 -1
- package/dist/src/flowchart/index.js +234 -220
- package/dist/src/flowchart/index.js.map +1 -1
- package/dist/src/flowchart/kinds.d.ts +438 -0
- package/dist/src/flowchart/kinds.d.ts.map +1 -0
- package/dist/src/flowchart/kinds.js +799 -0
- package/dist/src/flowchart/kinds.js.map +1 -0
- package/dist/src/flowchart/library.d.ts +154 -739
- package/dist/src/flowchart/library.d.ts.map +1 -1
- package/dist/src/flowchart/library.js +191 -673
- package/dist/src/flowchart/library.js.map +1 -1
- package/dist/src/flowchart/payload.d.ts +3652 -7843
- package/dist/src/flowchart/payload.d.ts.map +1 -1
- package/dist/src/flowchart/payload.js +331 -469
- package/dist/src/flowchart/payload.js.map +1 -1
- package/dist/src/flowchart/templates.d.ts +657 -0
- package/dist/src/flowchart/templates.d.ts.map +1 -0
- package/dist/src/flowchart/templates.js +658 -0
- package/dist/src/flowchart/templates.js.map +1 -0
- package/dist/src/flowchart/types.d.ts +2258 -214
- package/dist/src/flowchart/types.d.ts.map +1 -1
- package/dist/src/flowchart/types.js +374 -124
- package/dist/src/flowchart/types.js.map +1 -1
- package/dist/src/index.d.ts +13 -15
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +24 -29
- package/dist/src/index.js.map +1 -1
- package/dist/src/internal.d.ts +5 -7
- package/dist/src/internal.d.ts.map +1 -1
- package/dist/src/internal.js +12 -19
- package/dist/src/internal.js.map +1 -1
- package/dist/src/ontology/index.d.ts +44 -15
- package/dist/src/ontology/index.d.ts.map +1 -1
- package/dist/src/ontology/index.js +19 -11
- package/dist/src/ontology/index.js.map +1 -1
- package/dist/src/plan/event-rows.d.ts +2 -1
- package/dist/src/plan/event-rows.d.ts.map +1 -1
- package/dist/src/plan/event-rows.js +6 -4
- package/dist/src/plan/event-rows.js.map +1 -1
- package/dist/src/plan/ir.d.ts +1 -0
- package/dist/src/plan/ir.d.ts.map +1 -1
- package/dist/src/plan/plan.d.ts +145 -1
- package/dist/src/plan/plan.d.ts.map +1 -1
- package/dist/src/plan/plan.js +67 -3
- package/dist/src/plan/plan.js.map +1 -1
- package/dist/src/plan/types.d.ts +1 -0
- package/dist/src/plan/types.d.ts.map +1 -1
- package/dist/src/query/builder.d.ts +362 -315
- package/dist/src/query/builder.d.ts.map +1 -1
- package/dist/src/query/builder.js +12 -1
- package/dist/src/query/builder.js.map +1 -1
- package/dist/src/query/index.d.ts +5 -1
- package/dist/src/query/index.d.ts.map +1 -1
- package/dist/src/query/index.js +3 -1
- package/dist/src/query/index.js.map +1 -1
- package/dist/src/roster/fit.d.ts +5 -2
- package/dist/src/roster/fit.d.ts.map +1 -1
- package/dist/src/roster/fit.js +5 -3
- package/dist/src/roster/fit.js.map +1 -1
- package/dist/src/roster/index.d.ts +103 -2
- package/dist/src/roster/index.d.ts.map +1 -1
- package/dist/src/roster/index.js +45 -6
- package/dist/src/roster/index.js.map +1 -1
- package/dist/src/runtime/index.d.ts +1 -3
- package/dist/src/runtime/index.d.ts.map +1 -1
- package/dist/src/runtime/index.js +1 -3
- package/dist/src/runtime/index.js.map +1 -1
- package/dist/src/schedule/record-window.d.ts +1 -0
- package/dist/src/schedule/record-window.d.ts.map +1 -1
- package/dist/src/schematic/index.d.ts +1 -1
- package/dist/src/schematic/index.d.ts.map +1 -1
- package/dist/src/schematic/index.js +1 -1
- package/dist/src/schematic/index.js.map +1 -1
- package/dist/src/schematic/kinds.d.ts +4 -24
- package/dist/src/schematic/kinds.d.ts.map +1 -1
- package/dist/src/schematic/kinds.js +8 -212
- package/dist/src/schematic/kinds.js.map +1 -1
- package/dist/src/schematic/payload.d.ts +140 -1
- package/dist/src/schematic/payload.d.ts.map +1 -1
- package/dist/src/schematic/payload.js +38 -1
- package/dist/src/schematic/payload.js.map +1 -1
- package/dist/src/schematic/types.d.ts.map +1 -1
- package/dist/src/schematic/types.js +4 -36
- package/dist/src/schematic/types.js.map +1 -1
- package/dist/src/schematic/window.d.ts +9 -42
- package/dist/src/schematic/window.d.ts.map +1 -1
- package/dist/src/schematic/window.js +10 -115
- package/dist/src/schematic/window.js.map +1 -1
- package/dist/src/sheet/actions.d.ts +388 -0
- package/dist/src/sheet/actions.d.ts.map +1 -0
- package/dist/src/sheet/actions.js +594 -0
- package/dist/src/sheet/actions.js.map +1 -0
- package/dist/src/sheet/bridge.d.ts +12 -1
- package/dist/src/sheet/bridge.d.ts.map +1 -1
- package/dist/src/sheet/bridge.js +30 -6
- package/dist/src/sheet/bridge.js.map +1 -1
- package/dist/src/sheet/columns.d.ts +5 -2
- package/dist/src/sheet/columns.d.ts.map +1 -1
- package/dist/src/sheet/columns.js.map +1 -1
- package/dist/src/sheet/draft-bridge.d.ts +9 -4
- package/dist/src/sheet/draft-bridge.d.ts.map +1 -1
- package/dist/src/sheet/draft-bridge.js +22 -7
- package/dist/src/sheet/draft-bridge.js.map +1 -1
- package/dist/src/sheet/fields.d.ts +13 -0
- package/dist/src/sheet/fields.d.ts.map +1 -1
- package/dist/src/sheet/fields.js +3 -0
- package/dist/src/sheet/fields.js.map +1 -1
- package/dist/src/sheet/index.d.ts +32 -2
- package/dist/src/sheet/index.d.ts.map +1 -1
- package/dist/src/sheet/index.js +18 -3
- package/dist/src/sheet/index.js.map +1 -1
- package/dist/src/sheet/library.d.ts +8 -0
- package/dist/src/sheet/library.d.ts.map +1 -1
- package/dist/src/sheet/root.d.ts +23 -1
- package/dist/src/sheet/root.d.ts.map +1 -1
- package/dist/src/sheet/root.js +40 -5
- package/dist/src/sheet/root.js.map +1 -1
- package/dist/src/sheet/sheet.d.ts +7843 -4132
- package/dist/src/sheet/sheet.d.ts.map +1 -1
- package/dist/src/sheet/sheet.js +41 -2
- package/dist/src/sheet/sheet.js.map +1 -1
- package/dist/src/sheet/templates.d.ts +4 -0
- package/dist/src/sheet/templates.d.ts.map +1 -1
- package/dist/src/sheet/types.d.ts +12449 -5268
- package/dist/src/sheet/types.d.ts.map +1 -1
- package/dist/src/sheet/types.js +114 -2
- package/dist/src/sheet/types.js.map +1 -1
- package/dist/src/utils/derive.d.ts +1 -1
- package/dist/src/utils/derive.js +1 -1
- package/dist/src/utils/record-kind.d.ts +625 -0
- package/dist/src/utils/record-kind.d.ts.map +1 -0
- package/dist/src/utils/record-kind.js +450 -0
- package/dist/src/utils/record-kind.js.map +1 -0
- package/dist/src/utils/views.d.ts +55 -0
- package/dist/src/utils/views.d.ts.map +1 -0
- package/dist/src/utils/views.js +72 -0
- package/dist/src/utils/views.js.map +1 -0
- package/dist/src/utils/vocabulary.d.ts +48 -0
- package/dist/src/utils/vocabulary.d.ts.map +1 -0
- package/dist/src/utils/vocabulary.js +47 -0
- package/dist/src/utils/vocabulary.js.map +1 -0
- package/dist/test/allocation/allocation.examples.d.ts +2 -0
- package/dist/test/allocation/allocation.examples.d.ts.map +1 -1
- package/dist/test/allocation/allocation.examples.js +81 -2
- package/dist/test/allocation/allocation.examples.js.map +1 -1
- package/dist/test/bind/func/func.examples.d.ts +19 -1
- package/dist/test/bind/func/func.examples.d.ts.map +1 -1
- package/dist/test/bind/func/func.examples.js +36 -1
- package/dist/test/bind/func/func.examples.js.map +1 -1
- package/dist/test/calendar/calendar.examples.d.ts +2 -0
- package/dist/test/calendar/calendar.examples.d.ts.map +1 -1
- package/dist/test/calendar/calendar.examples.js +80 -2
- package/dist/test/calendar/calendar.examples.js.map +1 -1
- package/dist/test/decision/queue.examples.d.ts +1 -0
- package/dist/test/decision/queue.examples.d.ts.map +1 -1
- package/dist/test/decision/queue.examples.js +12 -0
- package/dist/test/decision/queue.examples.js.map +1 -1
- package/dist/test/examples-package.d.ts.map +1 -1
- package/dist/test/examples-package.js +5 -4
- package/dist/test/examples-package.js.map +1 -1
- package/dist/test/flowchart/flowchart.examples.d.ts +1250 -4605
- package/dist/test/flowchart/flowchart.examples.d.ts.map +1 -1
- package/dist/test/flowchart/flowchart.examples.js +861 -512
- package/dist/test/flowchart/flowchart.examples.js.map +1 -1
- package/dist/test/ontology/ontology.examples.d.ts +2 -3
- package/dist/test/ontology/ontology.examples.d.ts.map +1 -1
- package/dist/test/ontology/ontology.examples.js +32 -21
- package/dist/test/ontology/ontology.examples.js.map +1 -1
- package/dist/test/plan/plan-events.examples.d.ts +1 -0
- package/dist/test/plan/plan-events.examples.d.ts.map +1 -1
- package/dist/test/plan/plan-events.examples.js +44 -0
- package/dist/test/plan/plan-events.examples.js.map +1 -1
- package/dist/test/plan/plan-nested.examples.d.ts +2 -2
- package/dist/test/plan/plan-nested.examples.js +5 -5
- package/dist/test/plan/plan-nested.examples.js.map +1 -1
- package/dist/test/plan/plan-records.examples.d.ts.map +1 -1
- package/dist/test/plan/plan-records.examples.js +1 -1
- package/dist/test/plan/plan-records.examples.js.map +1 -1
- package/dist/test/query/query.examples.d.ts +2 -0
- package/dist/test/query/query.examples.d.ts.map +1 -1
- package/dist/test/query/query.examples.js +37 -1
- package/dist/test/query/query.examples.js.map +1 -1
- package/dist/test/roster/roster.examples.d.ts +2 -0
- package/dist/test/roster/roster.examples.d.ts.map +1 -1
- package/dist/test/roster/roster.examples.js +76 -15
- package/dist/test/roster/roster.examples.js.map +1 -1
- package/dist/test/schematic/schematic-records.examples.d.ts.map +1 -1
- package/dist/test/schematic/schematic-records.examples.js +6 -4
- package/dist/test/schematic/schematic-records.examples.js.map +1 -1
- package/dist/test/schematic/schematic.examples.d.ts +1 -0
- package/dist/test/schematic/schematic.examples.d.ts.map +1 -1
- package/dist/test/schematic/schematic.examples.js +144 -0
- package/dist/test/schematic/schematic.examples.js.map +1 -1
- package/dist/test/sheet/sheet-actions.examples.d.ts +1264 -0
- package/dist/test/sheet/sheet-actions.examples.d.ts.map +1 -0
- package/dist/test/sheet/sheet-actions.examples.js +394 -0
- package/dist/test/sheet/sheet-actions.examples.js.map +1 -0
- package/dist/test/sheet/sheet.examples.d.ts +1 -0
- package/dist/test/sheet/sheet.examples.d.ts.map +1 -1
- package/dist/test/sheet/sheet.examples.js +77 -0
- package/dist/test/sheet/sheet.examples.js.map +1 -1
- package/dist/test/studio/studio.examples.d.ts +1 -0
- package/dist/test/studio/studio.examples.d.ts.map +1 -1
- package/dist/test/studio/studio.examples.js +18 -8
- package/dist/test/studio/studio.examples.js.map +1 -1
- package/package.json +12 -12
- package/dist/src/diff/index.d.ts +0 -407
- package/dist/src/diff/index.d.ts.map +0 -1
- package/dist/src/diff/index.js +0 -203
- package/dist/src/diff/index.js.map +0 -1
- package/dist/src/experiment/index.d.ts +0 -1033
- package/dist/src/experiment/index.d.ts.map +0 -1
- package/dist/src/experiment/index.js +0 -197
- package/dist/src/experiment/index.js.map +0 -1
- package/dist/src/experiment/types.d.ts +0 -1093
- package/dist/src/experiment/types.d.ts.map +0 -1
- package/dist/src/experiment/types.js +0 -423
- package/dist/src/experiment/types.js.map +0 -1
- package/dist/src/flowchart/over.d.ts +0 -227
- package/dist/src/flowchart/over.d.ts.map +0 -1
- package/dist/src/flowchart/over.js +0 -213
- package/dist/src/flowchart/over.js.map +0 -1
- package/dist/src/flowchart/patch.d.ts +0 -64
- package/dist/src/flowchart/patch.d.ts.map +0 -1
- package/dist/src/flowchart/patch.js +0 -67
- package/dist/src/flowchart/patch.js.map +0 -1
- package/dist/src/flowchart/values.d.ts +0 -271
- package/dist/src/flowchart/values.d.ts.map +0 -1
- package/dist/src/flowchart/values.js +0 -220
- package/dist/src/flowchart/values.js.map +0 -1
- package/dist/src/flowchart/window.d.ts +0 -306
- package/dist/src/flowchart/window.d.ts.map +0 -1
- package/dist/src/flowchart/window.js +0 -63
- package/dist/src/flowchart/window.js.map +0 -1
- package/dist/src/runtime/diff.d.ts +0 -36
- package/dist/src/runtime/diff.d.ts.map +0 -1
- package/dist/src/runtime/diff.js +0 -34
- package/dist/src/runtime/diff.js.map +0 -1
- package/dist/src/runtime/experiment.d.ts +0 -48
- package/dist/src/runtime/experiment.d.ts.map +0 -1
- package/dist/src/runtime/experiment.js +0 -10
- package/dist/src/runtime/experiment.js.map +0 -1
- package/dist/test/diff/diff.examples.d.ts +0 -313
- package/dist/test/diff/diff.examples.d.ts.map +0 -1
- package/dist/test/diff/diff.examples.js +0 -452
- package/dist/test/diff/diff.examples.js.map +0 -1
- package/dist/test/experiment/experiment.examples.d.ts +0 -1512
- package/dist/test/experiment/experiment.examples.d.ts.map +0 -1
- package/dist/test/experiment/experiment.examples.js +0 -609
- package/dist/test/experiment/experiment.examples.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"experiment.examples.d.ts","sourceRoot":"","sources":["../../../test/experiment/experiment.examples.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AACH,sCAAsC;AAEtC;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,EACG,SAAS,EAAE,UAAU,EAAE,WAAW,EAAE,SAAS,EAAE,WAAW,EAAE,UAAU,EAAE,YAAY,EAC9E,OAAO,EACtB,MAAM,eAAe,CAAC;AAUvB,0EAA0E;AAC1E,eAAO,MAAM,QAAQ;;;;;;;;;EASnB,CAAC;AAEH,eAAO,MAAM,YAAY;;;;;;;;;+DAatB,CAAC;AAQJ,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CjB,CAAC;AAQT,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoBf,CAAC;AAWP,oFAAoF;AACpF,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0EAoBhC,CAAC;AAEJ,0FAA0F;AAC1F,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+EA6BpC,CAAC;AAEJ,0FAA0F;AAC1F,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sFA4I3C,CAAC;AAOJ,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0EAuBhC,CAAC;AAMJ,8EAA8E;AAC9E,eAAO,MAAM,iBAAiB,6CA8B5B,CAAC;AAEH,eAAO,MAAM,eAAe,6CA+B1B,CAAC;AAEH,eAAO,MAAM,cAAc,6CA+BzB,CAAC;AAEH,eAAO,MAAM,kBAAkB,6CAiC7B,CAAC;AAEH,qFAAqF;AACrF,eAAO,MAAM,cAAc,6CA8BzB,CAAC;AAEH,iGAAiG;AACjG,eAAO,MAAM,qBAAqB,6CAmDhC,CAAC;AAWH,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qFAkC1C,CAAC;AAEJ,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wFAiC5C,CAAC;AAEJ;;;;sDAIsD;AACtD,eAAO,MAAM,kBAAkB,6CA2C7B,CAAC"}
|
|
@@ -1,609 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "@elaraai/e3-ui/jsx-runtime";
|
|
2
|
-
/**
|
|
3
|
-
* Copyright (c) 2025 Elara AI Pty Ltd
|
|
4
|
-
* Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
|
|
5
|
-
*/
|
|
6
|
-
/** @jsxImportSource @elaraai/e3-ui */
|
|
7
|
-
/**
|
|
8
|
-
* Experiment component example — an interactive causal-experiment surface over a
|
|
9
|
-
* generic manufacturing process. The worked question is *"did `slow_cure` change
|
|
10
|
-
* `bond_strength`?"* — a confounding-by-indication story: the optional slow-cure
|
|
11
|
-
* step is applied to the weaker incoming material, so the raw average makes it
|
|
12
|
-
* look worse (−3.1) while the like-for-like estimate flips it positive (+5.2),
|
|
13
|
-
* and the honesty verdict is `causal`.
|
|
14
|
-
*
|
|
15
|
-
* Pattern (the real, interactive shape — not a mock):
|
|
16
|
-
* 1. `e3.input('batches', Array(BatchRow), variant('value', [...]))` — the **input dataset**. The
|
|
17
|
-
* renderer introspects this row struct to drive the treatment / outcome /
|
|
18
|
-
* confounder pickers, exactly like `Table`.
|
|
19
|
-
* 2. `e3.input('experiment_configs', Array(Configuration), variant('value', [...]))` — the list of
|
|
20
|
-
* **questions**. Each entry is self-contained: a full `spec`
|
|
21
|
-
* ({@link Experiment.Types.Config}) and an OPTIONAL precomputed `result`
|
|
22
|
-
* (+ `design`). Selecting one seeds the working config.
|
|
23
|
-
* 3. An OPTIONAL `e3.function('experiment', (rows, config) → ExperimentResult)`.
|
|
24
|
-
* One universal estimator serves every question; omit it when every shown
|
|
25
|
-
* config carries a precomputed `result`. Here it returns the constants the
|
|
26
|
-
* real `Causal.experiment` engine would, so the surface runs offline.
|
|
27
|
-
* 4. `<Experiment data configs experiment journal />`. The renderer selects the
|
|
28
|
-
* first config, auto-runs (unless it has a precomputed result), derives every
|
|
29
|
-
* word / colour / bar from the single result + its `verdict`, and re-runs when
|
|
30
|
-
* the user edits the config.
|
|
31
|
-
*/
|
|
32
|
-
import { East, ArrayType, StructType, BooleanType, FloatType, IntegerType, StringType, DateTimeType, some, none, variant, example, } from '@elaraai/east';
|
|
33
|
-
import { Reactive, Separator, UIComponentType, VStack } from '@elaraai/east-ui';
|
|
34
|
-
import { Data, Experiment, Func } from '@elaraai/e3-ui';
|
|
35
|
-
import e3 from '@elaraai/e3';
|
|
36
|
-
// ============================================================================
|
|
37
|
-
// Input dataset — the bonded-panel batches. The surface frames over these
|
|
38
|
-
// columns; the estimator ignores the rows (it returns a fixture).
|
|
39
|
-
// ============================================================================
|
|
40
|
-
/** One production batch — the row struct the pickers are generic over. */
|
|
41
|
-
export const BatchRow = StructType({
|
|
42
|
-
slow_cure: BooleanType, // treatment (yes / no)
|
|
43
|
-
bond_strength: FloatType, // outcome (MPa)
|
|
44
|
-
incoming_grade: FloatType, // confounder — the cure is applied to weaker stock
|
|
45
|
-
mix_viscosity: FloatType, // confounder
|
|
46
|
-
supplier: IntegerType, // confounder (categorical code)
|
|
47
|
-
line: StringType, // population filter dimension
|
|
48
|
-
product: StringType, // population filter dimension
|
|
49
|
-
run_date: DateTimeType, // suggested-but-unused column
|
|
50
|
-
});
|
|
51
|
-
export const batchesInput = e3.input('batches', ArrayType(BatchRow), variant('value', [
|
|
52
|
-
{ slow_cure: false, bond_strength: 9.0, incoming_grade: 9.0, mix_viscosity: 24.1, supplier: 0n, line: 'A', product: 'panel', run_date: new Date('2026-05-02') },
|
|
53
|
-
{ slow_cure: false, bond_strength: 8.6, incoming_grade: 8.5, mix_viscosity: 24.0, supplier: 0n, line: 'B', product: 'panel', run_date: new Date('2026-05-03') },
|
|
54
|
-
{ slow_cure: false, bond_strength: 8.2, incoming_grade: 8.0, mix_viscosity: 24.2, supplier: 1n, line: 'A', product: 'panel', run_date: new Date('2026-05-04') },
|
|
55
|
-
{ slow_cure: false, bond_strength: 7.7, incoming_grade: 7.5, mix_viscosity: 23.9, supplier: 0n, line: 'B', product: 'panel', run_date: new Date('2026-05-05') },
|
|
56
|
-
{ slow_cure: false, bond_strength: 7.3, incoming_grade: 7.0, mix_viscosity: 24.3, supplier: 1n, line: 'A', product: 'panel', run_date: new Date('2026-05-06') },
|
|
57
|
-
{ slow_cure: false, bond_strength: 6.8, incoming_grade: 6.5, mix_viscosity: 24.0, supplier: 0n, line: 'B', product: 'panel', run_date: new Date('2026-05-07') },
|
|
58
|
-
{ slow_cure: true, bond_strength: 7.1, incoming_grade: 5.0, mix_viscosity: 24.7, supplier: 1n, line: 'A', product: 'panel', run_date: new Date('2026-05-08') },
|
|
59
|
-
{ slow_cure: true, bond_strength: 6.6, incoming_grade: 4.5, mix_viscosity: 24.6, supplier: 1n, line: 'B', product: 'panel', run_date: new Date('2026-05-09') },
|
|
60
|
-
{ slow_cure: true, bond_strength: 6.2, incoming_grade: 4.0, mix_viscosity: 24.8, supplier: 1n, line: 'A', product: 'panel', run_date: new Date('2026-05-10') },
|
|
61
|
-
{ slow_cure: true, bond_strength: 5.7, incoming_grade: 3.5, mix_viscosity: 24.5, supplier: 0n, line: 'B', product: 'panel', run_date: new Date('2026-05-11') },
|
|
62
|
-
{ slow_cure: true, bond_strength: 5.3, incoming_grade: 3.0, mix_viscosity: 24.9, supplier: 1n, line: 'A', product: 'panel', run_date: new Date('2026-05-12') },
|
|
63
|
-
{ slow_cure: true, bond_strength: 4.8, incoming_grade: 2.5, mix_viscosity: 24.7, supplier: 1n, line: 'B', product: 'panel', run_date: new Date('2026-05-13') },
|
|
64
|
-
]));
|
|
65
|
-
// ============================================================================
|
|
66
|
-
// Estimator — ONE pure-East fixture returning the full numeric contract inline,
|
|
67
|
-
// so the docs show exactly what the engine produces. Exported so the snapshot
|
|
68
|
-
// harness compiles + seeds the same numbers.
|
|
69
|
-
// ============================================================================
|
|
70
|
-
export const experimentFn = e3.function('experiment', East.function([ArrayType(BatchRow), Experiment.Types.Config], Experiment.Types.Result, (_$, _data, _config) => ({
|
|
71
|
-
naive: -3.1,
|
|
72
|
-
naive_ci: some({ lower: -6.0, upper: -0.2 }),
|
|
73
|
-
adjusted: some({ effect: 5.2, ci: some({ lower: 3.1, upper: 7.4 }) }),
|
|
74
|
-
// n_dropped = rows outside the propensity common support (22% of 480).
|
|
75
|
-
n_total: 480n, n_treated: 240n, n_control: 240n, n_dropped: 106n,
|
|
76
|
-
balance: [
|
|
77
|
-
{ column: 'incoming_grade', base_column: 'incoming_grade', treated_mean: 6.1, control_mean: 8.0, std_diff: 0.90, std_diff_adjusted: some(0.07) },
|
|
78
|
-
{ column: 'supplier', base_column: 'supplier', treated_mean: 0.61, control_mean: 0.33, std_diff: 0.55, std_diff_adjusted: some(0.09) },
|
|
79
|
-
{ column: 'mix_viscosity', base_column: 'mix_viscosity', treated_mean: 24.6, control_mean: 24.1, std_diff: 0.24, std_diff_adjusted: some(0.05) },
|
|
80
|
-
],
|
|
81
|
-
overlap: {
|
|
82
|
-
treated_propensity: new Float64Array([0, 0, 1, 2, 4, 6, 9, 12, 15, 18, 20, 21, 19, 16, 12, 8, 5, 3, 1, 0]),
|
|
83
|
-
control_propensity: new Float64Array([0, 2, 5, 9, 14, 18, 21, 20, 17, 13, 9, 6, 4, 2, 1, 1, 0, 0, 0, 0]),
|
|
84
|
-
common_support_frac: 0.78,
|
|
85
|
-
positivity_ok: true,
|
|
86
|
-
support_strength: variant('strong', null),
|
|
87
|
-
},
|
|
88
|
-
refutation: some({
|
|
89
|
-
placebo_effect: some(0.0), placebo_passes: some(true), random_cc_within_ci: some(true),
|
|
90
|
-
data_subset_effect: some(5.0), data_subset_std: some(0.4), robustness_value: some(2.3),
|
|
91
|
-
sensitivity: some({
|
|
92
|
-
strengths: new Float64Array([0.0, 0.2, 0.4, 0.6, 0.8, 1.0]),
|
|
93
|
-
effects: new Float64Array([5.2, 4.4, 3.4, 2.2, 0.8, -0.8]),
|
|
94
|
-
benchmarks: [
|
|
95
|
-
{ column: 'incoming_grade', strength: 0.85 },
|
|
96
|
-
{ column: 'supplier', strength: 0.4 },
|
|
97
|
-
{ column: 'mix_viscosity', strength: 0.15 },
|
|
98
|
-
],
|
|
99
|
-
}),
|
|
100
|
-
expected_sign_ok: none,
|
|
101
|
-
}),
|
|
102
|
-
dose_response: some({
|
|
103
|
-
feature: 'incoming_grade',
|
|
104
|
-
grid: new Float64Array([2.5, 3.0, 3.5, 4.0, 4.5, 5.0, 5.5, 6.0, 6.5]),
|
|
105
|
-
effect: new Float64Array([0.0, 1.5, 2.6, 3.4, 4.0, 4.4, 4.6, 4.72, 4.8]),
|
|
106
|
-
lower: some(new Float64Array([-0.1, 1.0, 2.0, 2.7, 3.3, 3.7, 3.9, 4.0, 4.1])),
|
|
107
|
-
upper: some(new Float64Array([0.3, 2.0, 3.2, 4.1, 4.7, 5.1, 5.3, 5.45, 5.5])),
|
|
108
|
-
size: new BigInt64Array([40n, 52n, 61n, 66n, 70n, 58n, 44n, 30n, 18n]),
|
|
109
|
-
}),
|
|
110
|
-
verdict: variant('causal', null),
|
|
111
|
-
verdict_reasons: [],
|
|
112
|
-
outcome_sd: 1.4, materiality_threshold: 0.14,
|
|
113
|
-
treated_outcome_mean: some(5.3), control_outcome_mean: some(8.4),
|
|
114
|
-
})));
|
|
115
|
-
// ============================================================================
|
|
116
|
-
// Design — ONE pure-East fixture for the optional `design` function (the
|
|
117
|
-
// "Validate" tab), with the recipe inline; `Causal.designValidation` computes
|
|
118
|
-
// it in production.
|
|
119
|
-
// ============================================================================
|
|
120
|
-
export const designFn = e3.function('design', East.function([ArrayType(BatchRow), Experiment.Types.Config, Experiment.Types.Result, Experiment.Types.DesignConfig], Experiment.Types.Design, (_$, _data, _config, _result, _designConfig) => ({
|
|
121
|
-
verdict: variant('causal', null),
|
|
122
|
-
basis: variant('detect_observed', null),
|
|
123
|
-
target_effect: 5.2, outcome_sd: 1.4, target_power: 0.8, alpha: 0.05,
|
|
124
|
-
current_power: some(0.42),
|
|
125
|
-
match_on: ['incoming_grade', 'supplier'],
|
|
126
|
-
options: [
|
|
127
|
-
{ label: 'Even split', treated_share: 0.5, n_treated: 60n, n_control: 60n, n_total: 120n },
|
|
128
|
-
{ label: 'Treat fewer', treated_share: 0.33, n_treated: 45n, n_control: 91n, n_total: 136n },
|
|
129
|
-
],
|
|
130
|
-
power_curve: {
|
|
131
|
-
n: new BigInt64Array([40n, 80n, 120n, 160n, 200n, 240n]),
|
|
132
|
-
power: new Float64Array([0.32, 0.55, 0.72, 0.84, 0.91, 0.95]),
|
|
133
|
-
},
|
|
134
|
-
rationale: 'A randomised trial of ~120 batches (even split), matched on incoming grade and supplier, detects a +5.2 MPa effect at 80% power (α = 0.05).',
|
|
135
|
-
})));
|
|
136
|
-
// ============================================================================
|
|
137
|
-
// Configurations — the questions. Each entry's `spec` is a full
|
|
138
|
-
// ExperimentConfigType (snake_case; structurally identical to east-py-datascience's
|
|
139
|
-
// `Causal.Types.CausalExperimentConfigType`). The freeform list has one question
|
|
140
|
-
// (no precomputed answer → the estimator runs); the menu has three vetted
|
|
141
|
-
// questions; the curated list carries a precomputed `result` AND a precomputed
|
|
142
|
-
// `design` (so the Answer and Validate tabs both paint with no bound function).
|
|
143
|
-
// ============================================================================
|
|
144
|
-
/** A single question, no precomputed answer — the estimator auto-runs on select. */
|
|
145
|
-
export const experimentConfigsInput = e3.input('experiment_configs', ArrayType(Experiment.Types.Configuration), variant('value', [
|
|
146
|
-
{
|
|
147
|
-
id: 'cure_strength', label: 'Slow cure → bond strength',
|
|
148
|
-
spec: {
|
|
149
|
-
treatment: 'slow_cure', outcome: 'bond_strength',
|
|
150
|
-
common_causes: ['incoming_grade', 'mix_viscosity', 'supplier'],
|
|
151
|
-
categorical: some(['supplier']),
|
|
152
|
-
method: some(variant('propensity_score_weighting', { weighting_scheme: some(variant('ips_stabilized_weight', null)) })),
|
|
153
|
-
estimand: some(variant('ate', null)),
|
|
154
|
-
refute: some({ placebo: true, random_common_cause: true, data_subset: true, sensitivity: some([0.0, 0.2, 0.4, 0.6, 0.8, 1.0]) }),
|
|
155
|
-
dose_feature: some('incoming_grade'),
|
|
156
|
-
min_overlap: some(0.1), min_treatment_variation: some(0.02),
|
|
157
|
-
bootstrap: none, random_state: some(42n), strong_overlap: none, evalue_floor: none, expected_sign: none,
|
|
158
|
-
},
|
|
159
|
-
population: some([
|
|
160
|
-
variant('string', { fieldId: 'line', op: variant('in', new Set(['A', 'B'])) }),
|
|
161
|
-
variant('string', { fieldId: 'product', op: variant('eq', 'panel') }),
|
|
162
|
-
]),
|
|
163
|
-
group: none, result: none, design: none,
|
|
164
|
-
},
|
|
165
|
-
]));
|
|
166
|
-
/** Three vetted questions — the curated menu (no precomputed answers; each runs live). */
|
|
167
|
-
export const experimentMenuConfigsInput = e3.input('experiment_menu_configs', ArrayType(Experiment.Types.Configuration), variant('value', [
|
|
168
|
-
{
|
|
169
|
-
id: 'cure_strength', label: 'Slow cure → bond strength',
|
|
170
|
-
spec: {
|
|
171
|
-
treatment: 'slow_cure', outcome: 'bond_strength', common_causes: ['incoming_grade', 'mix_viscosity', 'supplier'],
|
|
172
|
-
categorical: some(['supplier']), method: none, estimand: none, refute: none, dose_feature: some('incoming_grade'),
|
|
173
|
-
min_overlap: none, min_treatment_variation: none, bootstrap: none, random_state: some(42n), strong_overlap: none, evalue_floor: none, expected_sign: none,
|
|
174
|
-
},
|
|
175
|
-
population: none, group: none, result: none, design: none,
|
|
176
|
-
},
|
|
177
|
-
{
|
|
178
|
-
id: 'cure_strength_panels', label: 'Slow cure → strength (panels only)',
|
|
179
|
-
spec: {
|
|
180
|
-
treatment: 'slow_cure', outcome: 'bond_strength', common_causes: ['incoming_grade', 'mix_viscosity', 'supplier'],
|
|
181
|
-
categorical: some(['supplier']), method: none, estimand: none, refute: none, dose_feature: some('incoming_grade'),
|
|
182
|
-
min_overlap: none, min_treatment_variation: none, bootstrap: none, random_state: some(42n), strong_overlap: none, evalue_floor: none, expected_sign: none,
|
|
183
|
-
},
|
|
184
|
-
population: some([variant('string', { fieldId: 'product', op: variant('eq', 'panel') })]),
|
|
185
|
-
group: none, result: none, design: none,
|
|
186
|
-
},
|
|
187
|
-
{
|
|
188
|
-
id: 'cure_strength_byline', label: 'Slow cure → strength (control for line)',
|
|
189
|
-
spec: {
|
|
190
|
-
treatment: 'slow_cure', outcome: 'bond_strength', common_causes: ['incoming_grade', 'mix_viscosity', 'supplier', 'line'],
|
|
191
|
-
categorical: some(['supplier', 'line']), method: none, estimand: none, refute: none, dose_feature: some('incoming_grade'),
|
|
192
|
-
min_overlap: none, min_treatment_variation: none, bootstrap: none, random_state: some(42n), strong_overlap: none, evalue_floor: none, expected_sign: none,
|
|
193
|
-
},
|
|
194
|
-
population: none, group: none, result: none, design: none,
|
|
195
|
-
},
|
|
196
|
-
]));
|
|
197
|
-
/** Curated, precomputed — the question carries its answer inline; no estimator needed. */
|
|
198
|
-
export const experimentPrecomputedConfigsInput = e3.input('experiment_precomputed_configs', ArrayType(Experiment.Types.Configuration), variant('value', [
|
|
199
|
-
{
|
|
200
|
-
id: 'cure_strength', label: 'Slow cure → bond strength',
|
|
201
|
-
spec: {
|
|
202
|
-
treatment: 'slow_cure', outcome: 'bond_strength', common_causes: ['incoming_grade', 'mix_viscosity', 'supplier'],
|
|
203
|
-
categorical: some(['supplier']), method: none, estimand: none, refute: none, dose_feature: some('incoming_grade'),
|
|
204
|
-
min_overlap: none, min_treatment_variation: none, bootstrap: none, random_state: some(42n), strong_overlap: none, evalue_floor: none, expected_sign: none,
|
|
205
|
-
},
|
|
206
|
-
population: none, group: none,
|
|
207
|
-
result: some({
|
|
208
|
-
naive: -3.1,
|
|
209
|
-
naive_ci: some({ lower: -6.0, upper: -0.2 }),
|
|
210
|
-
adjusted: some({ effect: 5.2, ci: some({ lower: 3.1, upper: 7.4 }) }),
|
|
211
|
-
n_total: 480n, n_treated: 240n, n_control: 240n, n_dropped: 106n,
|
|
212
|
-
balance: [
|
|
213
|
-
{ column: 'incoming_grade', base_column: 'incoming_grade', treated_mean: 6.1, control_mean: 8.0, std_diff: 0.90, std_diff_adjusted: some(0.07) },
|
|
214
|
-
{ column: 'supplier', base_column: 'supplier', treated_mean: 0.61, control_mean: 0.33, std_diff: 0.55, std_diff_adjusted: some(0.09) },
|
|
215
|
-
{ column: 'mix_viscosity', base_column: 'mix_viscosity', treated_mean: 24.6, control_mean: 24.1, std_diff: 0.24, std_diff_adjusted: some(0.05) },
|
|
216
|
-
],
|
|
217
|
-
overlap: {
|
|
218
|
-
treated_propensity: new Float64Array([0, 0, 1, 2, 4, 6, 9, 12, 15, 18, 20, 21, 19, 16, 12, 8, 5, 3, 1, 0]),
|
|
219
|
-
control_propensity: new Float64Array([0, 2, 5, 9, 14, 18, 21, 20, 17, 13, 9, 6, 4, 2, 1, 1, 0, 0, 0, 0]),
|
|
220
|
-
common_support_frac: 0.78, positivity_ok: true, support_strength: variant('strong', null),
|
|
221
|
-
},
|
|
222
|
-
refutation: some({
|
|
223
|
-
placebo_effect: some(0.0), placebo_passes: some(true), random_cc_within_ci: some(true),
|
|
224
|
-
data_subset_effect: some(5.0), data_subset_std: some(0.4), robustness_value: some(2.3),
|
|
225
|
-
sensitivity: some({
|
|
226
|
-
strengths: new Float64Array([0.0, 0.2, 0.4, 0.6, 0.8, 1.0]),
|
|
227
|
-
effects: new Float64Array([5.2, 4.4, 3.4, 2.2, 0.8, -0.8]),
|
|
228
|
-
benchmarks: [
|
|
229
|
-
{ column: 'incoming_grade', strength: 0.85 },
|
|
230
|
-
{ column: 'supplier', strength: 0.4 },
|
|
231
|
-
{ column: 'mix_viscosity', strength: 0.15 },
|
|
232
|
-
],
|
|
233
|
-
}),
|
|
234
|
-
expected_sign_ok: none,
|
|
235
|
-
}),
|
|
236
|
-
dose_response: some({
|
|
237
|
-
feature: 'incoming_grade',
|
|
238
|
-
grid: new Float64Array([2.5, 3.0, 3.5, 4.0, 4.5, 5.0, 5.5, 6.0, 6.5]),
|
|
239
|
-
effect: new Float64Array([0.0, 1.5, 2.6, 3.4, 4.0, 4.4, 4.6, 4.72, 4.8]),
|
|
240
|
-
lower: some(new Float64Array([-0.1, 1.0, 2.0, 2.7, 3.3, 3.7, 3.9, 4.0, 4.1])),
|
|
241
|
-
upper: some(new Float64Array([0.3, 2.0, 3.2, 4.1, 4.7, 5.1, 5.3, 5.45, 5.5])),
|
|
242
|
-
size: new BigInt64Array([40n, 52n, 61n, 66n, 70n, 58n, 44n, 30n, 18n]),
|
|
243
|
-
}),
|
|
244
|
-
verdict: variant('causal', null),
|
|
245
|
-
verdict_reasons: [],
|
|
246
|
-
outcome_sd: 1.4, materiality_threshold: 0.14,
|
|
247
|
-
treated_outcome_mean: some(5.3), control_outcome_mean: some(8.4),
|
|
248
|
-
}),
|
|
249
|
-
// A precomputed "Validate" recipe too — so the Validate tab paints straight from
|
|
250
|
-
// this entry with NO bound `design` function (the precomputed-design contract).
|
|
251
|
-
design: some({
|
|
252
|
-
verdict: variant('causal', null),
|
|
253
|
-
basis: variant('detect_observed', null),
|
|
254
|
-
target_effect: 5.2, outcome_sd: 1.4, target_power: 0.8, alpha: 0.05,
|
|
255
|
-
current_power: some(0.42),
|
|
256
|
-
match_on: ['incoming_grade', 'supplier'],
|
|
257
|
-
options: [
|
|
258
|
-
{ label: 'Even split', treated_share: 0.5, n_treated: 60n, n_control: 60n, n_total: 120n },
|
|
259
|
-
{ label: 'Treat fewer', treated_share: 0.33, n_treated: 45n, n_control: 91n, n_total: 136n },
|
|
260
|
-
],
|
|
261
|
-
power_curve: {
|
|
262
|
-
n: new BigInt64Array([40n, 80n, 120n, 160n, 200n, 240n]),
|
|
263
|
-
power: new Float64Array([0.32, 0.55, 0.72, 0.84, 0.91, 0.95]),
|
|
264
|
-
},
|
|
265
|
-
rationale: 'A randomised trial of ~120 batches (even split), matched on incoming grade and supplier, detects a +5.2 MPa effect at 80% power (α = 0.05).',
|
|
266
|
-
}),
|
|
267
|
-
},
|
|
268
|
-
{
|
|
269
|
-
id: 'cure_strength_byline', label: 'Slow cure → strength (control for line)',
|
|
270
|
-
spec: {
|
|
271
|
-
treatment: 'slow_cure', outcome: 'bond_strength', common_causes: ['incoming_grade', 'mix_viscosity', 'supplier', 'line'],
|
|
272
|
-
categorical: some(['supplier', 'line']), method: none, estimand: none, refute: none, dose_feature: some('incoming_grade'),
|
|
273
|
-
min_overlap: none, min_treatment_variation: none, bootstrap: none, random_state: some(42n), strong_overlap: none, evalue_floor: none, expected_sign: none,
|
|
274
|
-
},
|
|
275
|
-
population: none, group: none,
|
|
276
|
-
// Adjusting for `line` too leaves thinner common support → the same +effect, but
|
|
277
|
-
// a more cautious `modest` verdict. Selecting this question shows a DIFFERENT answer.
|
|
278
|
-
result: some({
|
|
279
|
-
naive: -3.1,
|
|
280
|
-
naive_ci: some({ lower: -5.4, upper: 0.1 }),
|
|
281
|
-
adjusted: some({ effect: 3.1, ci: some({ lower: 0.4, upper: 5.8 }) }),
|
|
282
|
-
n_total: 480n, n_treated: 240n, n_control: 240n, n_dropped: 283n,
|
|
283
|
-
balance: [
|
|
284
|
-
{ column: 'incoming_grade', base_column: 'incoming_grade', treated_mean: 6.1, control_mean: 8.0, std_diff: 0.62, std_diff_adjusted: some(0.11) },
|
|
285
|
-
{ column: 'line', base_column: 'line', treated_mean: 0.52, control_mean: 0.48, std_diff: 0.10, std_diff_adjusted: some(0.04) },
|
|
286
|
-
],
|
|
287
|
-
overlap: {
|
|
288
|
-
treated_propensity: new Float64Array([1, 3, 6, 10, 14, 17, 18, 16, 12, 9, 6, 4, 2, 1, 1, 0, 0, 0, 0, 0]),
|
|
289
|
-
control_propensity: new Float64Array([0, 0, 1, 2, 4, 7, 11, 15, 18, 20, 19, 16, 12, 8, 5, 3, 1, 0, 0, 0]),
|
|
290
|
-
common_support_frac: 0.41, positivity_ok: true, support_strength: variant('thin', null),
|
|
291
|
-
},
|
|
292
|
-
refutation: some({
|
|
293
|
-
placebo_effect: some(0.1), placebo_passes: some(true), random_cc_within_ci: some(true),
|
|
294
|
-
data_subset_effect: some(2.8), data_subset_std: some(0.7), robustness_value: some(1.4),
|
|
295
|
-
sensitivity: some({
|
|
296
|
-
strengths: new Float64Array([0.0, 0.2, 0.4, 0.6, 0.8, 1.0]),
|
|
297
|
-
effects: new Float64Array([3.1, 2.4, 1.6, 0.7, -0.3, -1.4]),
|
|
298
|
-
benchmarks: [
|
|
299
|
-
{ column: 'incoming_grade', strength: 0.75 },
|
|
300
|
-
{ column: 'line', strength: 0.2 },
|
|
301
|
-
],
|
|
302
|
-
}),
|
|
303
|
-
expected_sign_ok: none,
|
|
304
|
-
}),
|
|
305
|
-
dose_response: some({
|
|
306
|
-
feature: 'incoming_grade',
|
|
307
|
-
grid: new Float64Array([2.5, 3.0, 3.5, 4.0, 4.5, 5.0, 5.5, 6.0, 6.5]),
|
|
308
|
-
effect: new Float64Array([0.0, 0.9, 1.6, 2.1, 2.5, 2.8, 2.95, 3.05, 3.1]),
|
|
309
|
-
lower: some(new Float64Array([-0.4, 0.3, 0.9, 1.3, 1.7, 2.0, 2.1, 2.2, 2.25])),
|
|
310
|
-
upper: some(new Float64Array([0.4, 1.5, 2.3, 2.9, 3.3, 3.6, 3.8, 3.9, 3.95])),
|
|
311
|
-
size: new BigInt64Array([40n, 52n, 61n, 66n, 70n, 58n, 44n, 30n, 18n]),
|
|
312
|
-
}),
|
|
313
|
-
verdict: variant('modest', null),
|
|
314
|
-
// Modest BECAUSE the common support is thin — machine-readable.
|
|
315
|
-
verdict_reasons: [variant('thin_support', null)],
|
|
316
|
-
outcome_sd: 1.4, materiality_threshold: 0.14,
|
|
317
|
-
treated_outcome_mean: some(5.3), control_outcome_mean: some(8.4),
|
|
318
|
-
}),
|
|
319
|
-
// Its own precomputed "Validate" recipe — a smaller +3.1 effect needs a larger
|
|
320
|
-
// trial, and matching now includes `line`. Again no bound `design` function.
|
|
321
|
-
design: some({
|
|
322
|
-
verdict: variant('modest', null),
|
|
323
|
-
basis: variant('detect_observed', null),
|
|
324
|
-
target_effect: 3.1, outcome_sd: 1.4, target_power: 0.8, alpha: 0.05,
|
|
325
|
-
current_power: some(0.28),
|
|
326
|
-
match_on: ['incoming_grade', 'supplier', 'line'],
|
|
327
|
-
options: [
|
|
328
|
-
{ label: 'Even split', treated_share: 0.5, n_treated: 160n, n_control: 160n, n_total: 320n },
|
|
329
|
-
{ label: 'Treat fewer', treated_share: 0.33, n_treated: 119n, n_control: 241n, n_total: 360n },
|
|
330
|
-
],
|
|
331
|
-
power_curve: {
|
|
332
|
-
n: new BigInt64Array([120n, 200n, 280n, 360n, 440n, 520n]),
|
|
333
|
-
power: new Float64Array([0.34, 0.52, 0.67, 0.79, 0.87, 0.92]),
|
|
334
|
-
},
|
|
335
|
-
rationale: 'Controlling for line shrinks the effect to +3.1 MPa, so a confirming trial needs ~320 batches (even split), matched on incoming grade, supplier and line, for 80% power (α = 0.05).',
|
|
336
|
-
}),
|
|
337
|
-
},
|
|
338
|
-
]));
|
|
339
|
-
// ============================================================================
|
|
340
|
-
// Journal — committed experiments (newest first). The verdict is STORED on each
|
|
341
|
-
// row (not recomputed); the renderer derives only its colour/word from it.
|
|
342
|
-
// ============================================================================
|
|
343
|
-
export const experimentJournalInput = e3.input('experiment_journal', Experiment.Types.Journal, variant('value', [
|
|
344
|
-
{
|
|
345
|
-
config: {
|
|
346
|
-
treatment: 'slow_cure', outcome: 'bond_strength', common_causes: ['incoming_grade', 'mix_viscosity', 'supplier'],
|
|
347
|
-
categorical: none, method: none, estimand: none, refute: none,
|
|
348
|
-
dose_feature: none, min_overlap: none, min_treatment_variation: none, bootstrap: none, random_state: none,
|
|
349
|
-
strong_overlap: none, evalue_floor: none, expected_sign: none,
|
|
350
|
-
},
|
|
351
|
-
verdict: variant('causal', null), naive: -3.1, adjusted: some(5.2),
|
|
352
|
-
committed_at: new Date('2026-06-13T08:00:00Z'), committed_by: 'M. Kerr',
|
|
353
|
-
preset: some('cure_strength'),
|
|
354
|
-
},
|
|
355
|
-
{
|
|
356
|
-
config: {
|
|
357
|
-
treatment: 'extra_anneal', outcome: 'hardness', common_causes: ['line', 'mix_viscosity'],
|
|
358
|
-
categorical: none, method: none, estimand: none, refute: none,
|
|
359
|
-
dose_feature: none, min_overlap: none, min_treatment_variation: none, bootstrap: none, random_state: none,
|
|
360
|
-
strong_overlap: none, evalue_floor: none, expected_sign: none,
|
|
361
|
-
},
|
|
362
|
-
verdict: variant('modest', null), naive: 0.4, adjusted: some(0.4),
|
|
363
|
-
committed_at: new Date('2026-06-09T08:00:00Z'), committed_by: 'M. Kerr',
|
|
364
|
-
preset: none,
|
|
365
|
-
},
|
|
366
|
-
]));
|
|
367
|
-
// ============================================================================
|
|
368
|
-
// Scenes
|
|
369
|
-
// ============================================================================
|
|
370
|
-
/** Freeform single-question surface — one config, the estimator auto-runs. */
|
|
371
|
-
export const experimentSurface = example({
|
|
372
|
-
keywords: ['Experiment', 'causal', 'effect', 'confounding', 'forest', 'verdict', 'Data', 'Func', 'bind', 'configs', 'generic'],
|
|
373
|
-
description: 'An interactive causal-experiment surface: "did slow_cure change bond_strength?" — confounding by indication, with the raw-vs-adjusted sign flip and a "causal" verdict. The "Answer" tab. Driven by a bound `configs` list (one question) + one estimator function; every word is derived from the numbers + verdict.',
|
|
374
|
-
fn: East.function([], UIComponentType, (_$) => (_jsx(Reactive, { children: $ => {
|
|
375
|
-
const data = $.let(Data.bind(batchesInput));
|
|
376
|
-
const configs = $.let(Data.bind(experimentConfigsInput));
|
|
377
|
-
const journal = $.let(Data.bind(experimentJournalInput));
|
|
378
|
-
const experiment = $.let(Func.bind(experimentFn));
|
|
379
|
-
return (_jsx(Experiment, { data: data, configs: configs, experiment: experiment, journal: journal, columns: {
|
|
380
|
-
slow_cure: { label: 'Slow cure' },
|
|
381
|
-
bond_strength: { label: 'Bond strength', unit: 'MPa', higherIsBetter: true },
|
|
382
|
-
incoming_grade: { label: 'Incoming grade' },
|
|
383
|
-
mix_viscosity: { label: 'Mix viscosity' },
|
|
384
|
-
supplier: { label: 'Supplier' },
|
|
385
|
-
line: { label: 'Line' },
|
|
386
|
-
product: { label: 'Product' },
|
|
387
|
-
}, subject: "batch" }));
|
|
388
|
-
} }))),
|
|
389
|
-
inputs: [],
|
|
390
|
-
});
|
|
391
|
-
export const experimentTrust = example({
|
|
392
|
-
keywords: ['Experiment', 'causal', 'refute', 'trust', 'sensitivity', 'robustness', 'verdict'],
|
|
393
|
-
description: 'The Experiment "Can we trust it?" tab — the refutation checklist (shuffle / drop-some / decoy / hidden-cause) and the unobserved-confounder sensitivity curve, all from the single result\'s refutation summary.',
|
|
394
|
-
fn: East.function([], UIComponentType, (_$) => (_jsx(Reactive, { children: $ => {
|
|
395
|
-
const data = $.let(Data.bind(batchesInput));
|
|
396
|
-
const configs = $.let(Data.bind(experimentConfigsInput));
|
|
397
|
-
const journal = $.let(Data.bind(experimentJournalInput));
|
|
398
|
-
const experiment = $.let(Func.bind(experimentFn));
|
|
399
|
-
return (_jsx(Experiment, { data: data, configs: configs, experiment: experiment, journal: journal, columns: {
|
|
400
|
-
slow_cure: { label: 'Slow cure' },
|
|
401
|
-
bond_strength: { label: 'Bond strength', unit: 'MPa', higherIsBetter: true },
|
|
402
|
-
incoming_grade: { label: 'Incoming grade' },
|
|
403
|
-
mix_viscosity: { label: 'Mix viscosity' },
|
|
404
|
-
supplier: { label: 'Supplier' },
|
|
405
|
-
line: { label: 'Line' },
|
|
406
|
-
product: { label: 'Product' },
|
|
407
|
-
}, subject: "batch", defaultTab: "trust" }));
|
|
408
|
-
} }))),
|
|
409
|
-
inputs: [],
|
|
410
|
-
});
|
|
411
|
-
export const experimentDose = example({
|
|
412
|
-
keywords: ['Experiment', 'causal', 'dose', 'ale', 'response', 'marginal'],
|
|
413
|
-
description: 'The Experiment "How much?" tab — the ALE dose-response curve (with "you are here" + "sweet spot" markers) and the marginal-gain-per-step bars, from the single result\'s dose_response.',
|
|
414
|
-
fn: East.function([], UIComponentType, (_$) => (_jsx(Reactive, { children: $ => {
|
|
415
|
-
const data = $.let(Data.bind(batchesInput));
|
|
416
|
-
const configs = $.let(Data.bind(experimentConfigsInput));
|
|
417
|
-
const journal = $.let(Data.bind(experimentJournalInput));
|
|
418
|
-
const experiment = $.let(Func.bind(experimentFn));
|
|
419
|
-
return (_jsx(Experiment, { data: data, configs: configs, experiment: experiment, journal: journal, columns: {
|
|
420
|
-
slow_cure: { label: 'Slow cure' },
|
|
421
|
-
bond_strength: { label: 'Bond strength', unit: 'MPa', higherIsBetter: true },
|
|
422
|
-
incoming_grade: { label: 'Incoming grade' },
|
|
423
|
-
mix_viscosity: { label: 'Mix viscosity' },
|
|
424
|
-
supplier: { label: 'Supplier' },
|
|
425
|
-
line: { label: 'Line' },
|
|
426
|
-
product: { label: 'Product' },
|
|
427
|
-
}, subject: "batch", defaultTab: "dose" }));
|
|
428
|
-
} }))),
|
|
429
|
-
inputs: [],
|
|
430
|
-
});
|
|
431
|
-
export const experimentValidate = example({
|
|
432
|
-
keywords: ['Experiment', 'causal', 'validate', 'design', 'trial', 'rct', 'power', 'sample-size'],
|
|
433
|
-
description: 'The Experiment "Validate" tab — the optional `design` function turns the landed result into the recipe for a real randomised controlled trial: the split meter, the confounders to match the groups on, and the power curve sized from the observed effect.',
|
|
434
|
-
fn: East.function([], UIComponentType, (_$) => (_jsx(Reactive, { children: $ => {
|
|
435
|
-
const data = $.let(Data.bind(batchesInput));
|
|
436
|
-
const configs = $.let(Data.bind(experimentConfigsInput));
|
|
437
|
-
const journal = $.let(Data.bind(experimentJournalInput));
|
|
438
|
-
const experiment = $.let(Func.bind(experimentFn));
|
|
439
|
-
const design = $.let(Func.bind(designFn));
|
|
440
|
-
return (_jsx(Experiment, { data: data, configs: configs, experiment: experiment, design: design, journal: journal, columns: {
|
|
441
|
-
slow_cure: { label: 'Slow cure' },
|
|
442
|
-
bond_strength: { label: 'Bond strength', unit: 'MPa', higherIsBetter: true },
|
|
443
|
-
incoming_grade: { label: 'Incoming grade' },
|
|
444
|
-
mix_viscosity: { label: 'Mix viscosity' },
|
|
445
|
-
supplier: { label: 'Supplier' },
|
|
446
|
-
line: { label: 'Line' },
|
|
447
|
-
product: { label: 'Product' },
|
|
448
|
-
}, subject: "batch", defaultTab: "validate" }));
|
|
449
|
-
} }))),
|
|
450
|
-
inputs: [],
|
|
451
|
-
});
|
|
452
|
-
/** The question selector — a menu of three vetted questions, each estimated live. */
|
|
453
|
-
export const experimentMenu = example({
|
|
454
|
-
keywords: ['Experiment', 'configs', 'causal', 'questions', 'vetted', 'dropdown', 'menu', 'scope', 'select'],
|
|
455
|
-
description: 'The Experiment question selector — the title doubles as a menu of named, vetted questions (current one checked). Each bundles a vetted backdoor set (and optional population scope); selecting one seeds the working config (still editable before Run). Lets a domain expert pick a correct causal question from a menu rather than assemble one.',
|
|
456
|
-
fn: East.function([], UIComponentType, (_$) => (_jsx(Reactive, { children: $ => {
|
|
457
|
-
const data = $.let(Data.bind(batchesInput));
|
|
458
|
-
const configs = $.let(Data.bind(experimentMenuConfigsInput));
|
|
459
|
-
const journal = $.let(Data.bind(experimentJournalInput));
|
|
460
|
-
const experiment = $.let(Func.bind(experimentFn));
|
|
461
|
-
return (_jsx(Experiment, { data: data, configs: configs, experiment: experiment, journal: journal, columns: {
|
|
462
|
-
slow_cure: { label: 'Slow cure' },
|
|
463
|
-
bond_strength: { label: 'Bond strength', unit: 'MPa', higherIsBetter: true },
|
|
464
|
-
incoming_grade: { label: 'Incoming grade' },
|
|
465
|
-
mix_viscosity: { label: 'Mix viscosity' },
|
|
466
|
-
supplier: { label: 'Supplier' },
|
|
467
|
-
line: { label: 'Line' },
|
|
468
|
-
product: { label: 'Product' },
|
|
469
|
-
}, subject: "batch" }));
|
|
470
|
-
} }))),
|
|
471
|
-
inputs: [],
|
|
472
|
-
});
|
|
473
|
-
/** Curated decision surface — a precomputed answer (browsable and locked), no live estimator. */
|
|
474
|
-
export const experimentPrecomputed = example({
|
|
475
|
-
keywords: ['Experiment', 'causal', 'precomputed', 'result', 'configs', 'curated', 'decision surface', 'menu', 'no-run', 'readonly', 'locked', 'view-only'],
|
|
476
|
-
description: 'Precomputed panel — PRECOMPUTED: a curated causal-experiment menu of two vetted questions, each carrying its own precomputed `result` (a confident "causal" +5.2, and a more cautious "modest" +3.1 once you also control for line) AND a precomputed `design`; no estimator, no design function, no Run — selecting a question from the title menu paints both its answer and its "Validate" trial recipe straight from the bound values. READONLY PRECOMPUTED: the locked variant — `readonly` is on, so the same questions can still be browsed (the question selector stays live: selecting is navigation, not editing) but the config pickers, Run and Commit are all hidden, and a "View only" badge marks the surface; a pure view-only decision surface.',
|
|
477
|
-
fn: East.function([], UIComponentType, (_$) => (_jsxs(VStack, { gap: "4", align: "stretch", children: [_jsx(Separator, { label: "PRECOMPUTED", align: "start" }), _jsx(Reactive, { children: $ => {
|
|
478
|
-
const data = $.let(Data.bind(batchesInput));
|
|
479
|
-
const configs = $.let(Data.bind(experimentPrecomputedConfigsInput));
|
|
480
|
-
return (_jsx(Experiment, { data: data, configs: configs, columns: {
|
|
481
|
-
slow_cure: { label: 'Slow cure' },
|
|
482
|
-
bond_strength: { label: 'Bond strength', unit: 'MPa', higherIsBetter: true },
|
|
483
|
-
incoming_grade: { label: 'Incoming grade' },
|
|
484
|
-
mix_viscosity: { label: 'Mix viscosity' },
|
|
485
|
-
supplier: { label: 'Supplier' },
|
|
486
|
-
line: { label: 'Line' },
|
|
487
|
-
product: { label: 'Product' },
|
|
488
|
-
}, subject: "batch" }));
|
|
489
|
-
} }), _jsx(Separator, { label: "READONLY PRECOMPUTED", align: "start" }), _jsx(Reactive, { children: $ => {
|
|
490
|
-
const data = $.let(Data.bind(batchesInput));
|
|
491
|
-
const configs = $.let(Data.bind(experimentPrecomputedConfigsInput));
|
|
492
|
-
return (_jsx(Experiment, { data: data, configs: configs, readonly: true, columns: {
|
|
493
|
-
slow_cure: { label: 'Slow cure' },
|
|
494
|
-
bond_strength: { label: 'Bond strength', unit: 'MPa', higherIsBetter: true },
|
|
495
|
-
incoming_grade: { label: 'Incoming grade' },
|
|
496
|
-
mix_viscosity: { label: 'Mix viscosity' },
|
|
497
|
-
supplier: { label: 'Supplier' },
|
|
498
|
-
line: { label: 'Line' },
|
|
499
|
-
product: { label: 'Product' },
|
|
500
|
-
}, subject: "batch" }));
|
|
501
|
-
} })] }))),
|
|
502
|
-
inputs: [],
|
|
503
|
-
});
|
|
504
|
-
// ============================================================================
|
|
505
|
-
// Refusal scenes — the two verdicts where the engine returns `adjusted = none`
|
|
506
|
-
// rather than a number. Precomputed (no estimator), so the surface paints the
|
|
507
|
-
// refusal zones directly: the positivity case renders the overlap histogram as
|
|
508
|
-
// its centrepiece; the not-estimable case renders the engine's reason. Neither
|
|
509
|
-
// names a `dose_feature`, so the "How much?" tab is hidden (nothing could ever
|
|
510
|
-
// put a curve on it).
|
|
511
|
-
// ============================================================================
|
|
512
|
-
export const experimentPositivityConfigsInput = e3.input('experiment_positivity_configs', ArrayType(Experiment.Types.Configuration), variant('value', [
|
|
513
|
-
{
|
|
514
|
-
id: 'cure_strength_overlap', label: 'Slow cure → bond strength (no overlap)',
|
|
515
|
-
spec: {
|
|
516
|
-
treatment: 'slow_cure', outcome: 'bond_strength', common_causes: ['incoming_grade', 'mix_viscosity'],
|
|
517
|
-
categorical: none, method: none, estimand: none, refute: none, dose_feature: none,
|
|
518
|
-
min_overlap: none, min_treatment_variation: none, bootstrap: none, random_state: none, strong_overlap: none, evalue_floor: none, expected_sign: none,
|
|
519
|
-
},
|
|
520
|
-
population: none, group: none,
|
|
521
|
-
// The two arms' propensity histograms barely meet — only 6% common
|
|
522
|
-
// support — so the engine refuses: `non_identifiable_positivity`.
|
|
523
|
-
result: some({
|
|
524
|
-
naive: -3.1,
|
|
525
|
-
naive_ci: some({ lower: -5.8, upper: -0.4 }),
|
|
526
|
-
adjusted: none,
|
|
527
|
-
n_total: 480n, n_treated: 240n, n_control: 240n, n_dropped: 451n,
|
|
528
|
-
balance: [
|
|
529
|
-
{ column: 'incoming_grade', base_column: 'incoming_grade', treated_mean: 3.4, control_mean: 8.2, std_diff: 2.10, std_diff_adjusted: none },
|
|
530
|
-
{ column: 'mix_viscosity', base_column: 'mix_viscosity', treated_mean: 24.8, control_mean: 24.0, std_diff: 0.38, std_diff_adjusted: none },
|
|
531
|
-
],
|
|
532
|
-
overlap: {
|
|
533
|
-
treated_propensity: new Float64Array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 3, 7, 13, 18, 22, 19, 12, 5]),
|
|
534
|
-
control_propensity: new Float64Array([5, 12, 19, 22, 18, 13, 7, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]),
|
|
535
|
-
common_support_frac: 0.06, positivity_ok: false, support_strength: variant('refused', null),
|
|
536
|
-
},
|
|
537
|
-
refutation: none,
|
|
538
|
-
dose_response: none,
|
|
539
|
-
verdict: variant('non_identifiable_positivity', null),
|
|
540
|
-
verdict_reasons: [],
|
|
541
|
-
outcome_sd: 1.5, materiality_threshold: 0.15,
|
|
542
|
-
treated_outcome_mean: some(5.1), control_outcome_mean: some(8.2),
|
|
543
|
-
}),
|
|
544
|
-
design: none,
|
|
545
|
-
},
|
|
546
|
-
]));
|
|
547
|
-
export const experimentNotEstimableConfigsInput = e3.input('experiment_not_estimable_configs', ArrayType(Experiment.Types.Configuration), variant('value', [
|
|
548
|
-
{
|
|
549
|
-
id: 'deal_strength', label: 'Special batch flag → bond strength (44-unit arm)',
|
|
550
|
-
spec: {
|
|
551
|
-
treatment: 'slow_cure', outcome: 'bond_strength', common_causes: ['incoming_grade'],
|
|
552
|
-
categorical: none, method: none, estimand: none, refute: none, dose_feature: none,
|
|
553
|
-
min_overlap: none, min_treatment_variation: none, bootstrap: none, random_state: none, strong_overlap: none, evalue_floor: none, expected_sign: none,
|
|
554
|
-
},
|
|
555
|
-
population: none, group: none,
|
|
556
|
-
// Almost every batch is on one side of the treatment — the engine
|
|
557
|
-
// refuses with `not_estimable` and says why in the verdict's payload.
|
|
558
|
-
result: some({
|
|
559
|
-
naive: 0.8,
|
|
560
|
-
naive_ci: none,
|
|
561
|
-
adjusted: none,
|
|
562
|
-
n_total: 3688n, n_treated: 44n, n_control: 3644n, n_dropped: 2028n,
|
|
563
|
-
balance: [
|
|
564
|
-
{ column: 'incoming_grade', base_column: 'incoming_grade', treated_mean: 6.0, control_mean: 6.1, std_diff: 0.05, std_diff_adjusted: none },
|
|
565
|
-
],
|
|
566
|
-
overlap: {
|
|
567
|
-
treated_propensity: new Float64Array([2, 5, 8, 9, 8, 6, 3, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]),
|
|
568
|
-
control_propensity: new Float64Array([180, 320, 450, 520, 510, 430, 340, 260, 190, 140, 100, 70, 50, 30, 20, 12, 8, 5, 2, 1]),
|
|
569
|
-
common_support_frac: 0.45, positivity_ok: true, support_strength: variant('thin', null),
|
|
570
|
-
},
|
|
571
|
-
refutation: none,
|
|
572
|
-
dose_response: none,
|
|
573
|
-
verdict: variant('not_estimable', 'treatment barely varies: the minority arm is 1.2% of rows'),
|
|
574
|
-
verdict_reasons: [],
|
|
575
|
-
outcome_sd: 1.2, materiality_threshold: 0.12,
|
|
576
|
-
treated_outcome_mean: some(6.9), control_outcome_mean: some(6.1),
|
|
577
|
-
}),
|
|
578
|
-
design: none,
|
|
579
|
-
},
|
|
580
|
-
]));
|
|
581
|
-
/** The two REFUSALS side-by-side. Positivity: no like-for-like comparison
|
|
582
|
-
* exists; the Answer tab renders the back-to-back propensity histogram
|
|
583
|
-
* instead of a number, and the hidden "How much?" tab demonstrates the
|
|
584
|
-
* dose-tab gating. Not-estimable: a 44-unit treated arm; the engine refuses
|
|
585
|
-
* with its reason string and the evidence counts. */
|
|
586
|
-
export const experimentRefusals = example({
|
|
587
|
-
keywords: ['Experiment', 'causal', 'refusal', 'positivity', 'overlap', 'histogram', 'no comparison', 'verdict', 'not_estimable', 'variation', 'tiny arm'],
|
|
588
|
-
description: 'Refusal panel — REFUSAL OVERLAP: the treated and untreated batches barely overlap on the confounders, so the engine refuses to estimate (adjusted = none, verdict non_identifiable_positivity) and the Answer tab explains why over the propensity-overlap histogram; no dose feature → the "How much?" tab is hidden. REFUSAL NOT ESTIMABLE: almost every batch is on one side of the treatment (a 44-unit arm), so the engine refuses to guess (adjusted = none, verdict not_estimable) and the Answer tab shows the engine\'s reason plus the arm counts.',
|
|
589
|
-
fn: East.function([], UIComponentType, (_$) => (_jsxs(VStack, { gap: "4", align: "stretch", children: [_jsx(Separator, { label: "REFUSAL OVERLAP", align: "start" }), _jsx(Reactive, { children: $ => {
|
|
590
|
-
const data = $.let(Data.bind(batchesInput));
|
|
591
|
-
const configs = $.let(Data.bind(experimentPositivityConfigsInput));
|
|
592
|
-
return (_jsx(Experiment, { data: data, configs: configs, columns: {
|
|
593
|
-
slow_cure: { label: 'Slow cure' },
|
|
594
|
-
bond_strength: { label: 'Bond strength', unit: 'MPa', higherIsBetter: true },
|
|
595
|
-
incoming_grade: { label: 'Incoming grade' },
|
|
596
|
-
mix_viscosity: { label: 'Mix viscosity' },
|
|
597
|
-
}, subject: "batch" }));
|
|
598
|
-
} }), _jsx(Separator, { label: "REFUSAL NOT ESTIMABLE", align: "start" }), _jsx(Reactive, { children: $ => {
|
|
599
|
-
const data = $.let(Data.bind(batchesInput));
|
|
600
|
-
const configs = $.let(Data.bind(experimentNotEstimableConfigsInput));
|
|
601
|
-
return (_jsx(Experiment, { data: data, configs: configs, columns: {
|
|
602
|
-
slow_cure: { label: 'Slow cure' },
|
|
603
|
-
bond_strength: { label: 'Bond strength', unit: 'MPa', higherIsBetter: true },
|
|
604
|
-
incoming_grade: { label: 'Incoming grade' },
|
|
605
|
-
}, subject: "batch" }));
|
|
606
|
-
} })] }))),
|
|
607
|
-
inputs: [],
|
|
608
|
-
});
|
|
609
|
-
//# sourceMappingURL=experiment.examples.js.map
|