@elaraai/east-py-datascience 1.0.19 → 1.0.20
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/causal/causal.d.ts +487 -35
- package/dist/src/causal/causal.d.ts.map +1 -1
- package/dist/src/causal/causal.js +75 -3
- package/dist/src/causal/causal.js.map +1 -1
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +2 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/model_blob.d.ts +146 -0
- package/dist/src/model_blob.d.ts.map +1 -0
- package/dist/src/model_blob.js +53 -0
- package/dist/src/model_blob.js.map +1 -0
- package/package.json +3 -3
|
@@ -59,6 +59,20 @@ export declare const CausalTargetUnitsType: VariantType<{
|
|
|
59
59
|
/** Average treatment effect on the controls */
|
|
60
60
|
readonly atc: NullType;
|
|
61
61
|
}>;
|
|
62
|
+
/**
|
|
63
|
+
* A directional prior on the effect — the sign a domain expert expects. Used by
|
|
64
|
+
* {@link causal_experiment}'s `expected_sign` guard: a material, CI-clear effect
|
|
65
|
+
* pointing the *other* way is flagged (a reverse-causation / reactive-assignment
|
|
66
|
+
* signal a backdoor adjustment cannot catch).
|
|
67
|
+
*
|
|
68
|
+
* twin: e3-ui/src/experiment/types.ts `SignType`
|
|
69
|
+
*/
|
|
70
|
+
export declare const CausalSignType: VariantType<{
|
|
71
|
+
/** The effect is expected to increase the outcome. */
|
|
72
|
+
readonly positive: NullType;
|
|
73
|
+
/** The effect is expected to decrease the outcome. */
|
|
74
|
+
readonly negative: NullType;
|
|
75
|
+
}>;
|
|
62
76
|
/**
|
|
63
77
|
* Bootstrap confidence interval configuration.
|
|
64
78
|
*
|
|
@@ -160,6 +174,23 @@ export declare const CausalExperimentConfigType: StructType<{
|
|
|
160
174
|
}>>;
|
|
161
175
|
/** Random seed. */
|
|
162
176
|
readonly random_state: OptionType<IntegerType>;
|
|
177
|
+
/** Graded-overlap threshold — common support below this keeps `causal` from the
|
|
178
|
+
* top tier (verdict `modest`, `overlap.support_strength = thin`); default 0.55. */
|
|
179
|
+
readonly strong_overlap: OptionType<FloatType>;
|
|
180
|
+
/** Robustness floor — when set, a `causal` verdict whose E-value
|
|
181
|
+
* (`refutation.robustness_value`, risk-ratio scale) is below this is downgraded to
|
|
182
|
+
* `modest`. Off by default. The E-value is a monotone transform of the standardized
|
|
183
|
+
* effect, so this acts as a stricter materiality bar, not an independent check. */
|
|
184
|
+
readonly evalue_floor: OptionType<FloatType>;
|
|
185
|
+
/** Directional prior — when set, a material, CI-clear effect of the opposite sign is
|
|
186
|
+
* flagged (`refutation.expected_sign_ok = some(false)`, verdict `adjustment_insufficient`).
|
|
187
|
+
* Off by default. Catches reverse causation / reactive assignment the refuters can't. */
|
|
188
|
+
readonly expected_sign: OptionType<VariantType<{
|
|
189
|
+
/** The effect is expected to increase the outcome. */
|
|
190
|
+
readonly positive: NullType;
|
|
191
|
+
/** The effect is expected to decrease the outcome. */
|
|
192
|
+
readonly negative: NullType;
|
|
193
|
+
}>>;
|
|
163
194
|
}>;
|
|
164
195
|
/** One confounder's before-adjustment imbalance (categoricals → one row per level). */
|
|
165
196
|
export declare const BalanceRowType: StructType<{
|
|
@@ -172,6 +203,24 @@ export declare const BalanceRowType: StructType<{
|
|
|
172
203
|
/** Standardized mean difference, (mt-mc)/sqrt((vt+vc)/2). */
|
|
173
204
|
readonly std_diff: FloatType;
|
|
174
205
|
}>;
|
|
206
|
+
/**
|
|
207
|
+
* Graded common-support tier — the honest three-state reading of overlap a
|
|
208
|
+
* consumer can switch on without re-deriving thresholds:
|
|
209
|
+
* `refused` (below `min_overlap`, the engine refuses), `thin` (clears the refuse
|
|
210
|
+
* gate but below `strong_overlap` — fragile), `strong` (≥ `strong_overlap`). With
|
|
211
|
+
* no confounders (or a degenerate arm) there is nothing to separate on, so the tier
|
|
212
|
+
* is vacuously `strong`.
|
|
213
|
+
*
|
|
214
|
+
* twin: e3-ui/src/experiment/types.ts `SupportStrengthType`
|
|
215
|
+
*/
|
|
216
|
+
export declare const SupportStrengthType: VariantType<{
|
|
217
|
+
/** Below `min_overlap` — no like-for-like comparison (engine refuses). */
|
|
218
|
+
readonly refused: NullType;
|
|
219
|
+
/** Clears the refuse gate but below `strong_overlap` — fragile support. */
|
|
220
|
+
readonly thin: NullType;
|
|
221
|
+
/** Common support ≥ `strong_overlap` — solid. */
|
|
222
|
+
readonly strong: NullType;
|
|
223
|
+
}>;
|
|
175
224
|
/** Positivity / common-support diagnostic (binary treatment). */
|
|
176
225
|
export declare const OverlapDiagnosticType: StructType<{
|
|
177
226
|
/** Propensity histogram (20 bins over [0,1]) for the treated arm. */
|
|
@@ -180,8 +229,21 @@ export declare const OverlapDiagnosticType: StructType<{
|
|
|
180
229
|
readonly control_propensity: VectorType<FloatType>;
|
|
181
230
|
/** Fraction of rows inside the treated/control common support. */
|
|
182
231
|
readonly common_support_frac: FloatType;
|
|
183
|
-
/** Whether common support clears `min_overlap
|
|
232
|
+
/** Whether common support clears the **refuse** gate `min_overlap` — i.e. an
|
|
233
|
+
* adjusted estimate is attempted at all. NOT a quality signal: `true` at the
|
|
234
|
+
* default gate (0.10) still means barely-overlapping. Read `support_strength`
|
|
235
|
+
* for the graded tier. */
|
|
184
236
|
readonly positivity_ok: BooleanType;
|
|
237
|
+
/** Graded common-support tier (`refused` / `thin` / `strong` vs `strong_overlap`).
|
|
238
|
+
* twin: e3-ui OverlapDiagnosticType.support_strength */
|
|
239
|
+
readonly support_strength: VariantType<{
|
|
240
|
+
/** Below `min_overlap` — no like-for-like comparison (engine refuses). */
|
|
241
|
+
readonly refused: NullType;
|
|
242
|
+
/** Clears the refuse gate but below `strong_overlap` — fragile support. */
|
|
243
|
+
readonly thin: NullType;
|
|
244
|
+
/** Common support ≥ `strong_overlap` — solid. */
|
|
245
|
+
readonly strong: NullType;
|
|
246
|
+
}>;
|
|
185
247
|
}>;
|
|
186
248
|
/** The robustness summary the verdict + Trust tab consume. */
|
|
187
249
|
export declare const RefutationType: StructType<{
|
|
@@ -195,13 +257,22 @@ export declare const RefutationType: StructType<{
|
|
|
195
257
|
readonly data_subset_effect: OptionType<FloatType>;
|
|
196
258
|
/** Std of the effect across data subsamples. */
|
|
197
259
|
readonly data_subset_std: OptionType<FloatType>;
|
|
198
|
-
/** Closed-form E-value — confounder strength needed to
|
|
260
|
+
/** Closed-form E-value (risk-ratio scale) — the confounder strength needed to
|
|
261
|
+
* explain the effect away. A monotone transform of the standardized effect, so
|
|
262
|
+
* it is NOT independent of the effect size; read it as "how easily overturned",
|
|
263
|
+
* not as a separate confounding measure. */
|
|
199
264
|
readonly robustness_value: OptionType<FloatType>;
|
|
200
265
|
/** Unobserved-confounder sensitivity (tipping) curve: effect at each simulated strength. */
|
|
201
266
|
readonly sensitivity: OptionType<StructType<{
|
|
202
267
|
readonly strengths: VectorType<FloatType>;
|
|
203
268
|
readonly effects: VectorType<FloatType>;
|
|
204
269
|
}>>;
|
|
270
|
+
/** Sign-prior check (when `config.expected_sign` is set): `some(true)` if a
|
|
271
|
+
* material effect matches the expected direction, `some(false)` if it points the
|
|
272
|
+
* other way (→ verdict `adjustment_insufficient`). `none` when no prior is given
|
|
273
|
+
* or the effect is near-zero (its sign is undefined).
|
|
274
|
+
* twin: e3-ui RefutationType.expected_sign_ok */
|
|
275
|
+
readonly expected_sign_ok: OptionType<BooleanType>;
|
|
205
276
|
}>;
|
|
206
277
|
/** A dose-response (ALE) curve of a continuous feature on the outcome. */
|
|
207
278
|
export declare const DoseResponseType: StructType<{
|
|
@@ -218,7 +289,10 @@ export declare const DoseResponseType: StructType<{
|
|
|
218
289
|
* Only `not_estimable` carries a (human-readable) reason.
|
|
219
290
|
*/
|
|
220
291
|
export declare const ExperimentVerdictType: VariantType<{
|
|
221
|
-
/** A real, robust, material effect
|
|
292
|
+
/** A real, robust, material effect — robust to the **observed** backdoor set + the
|
|
293
|
+
* refuters that were run. It does NOT mean correctly-signed, free of reverse
|
|
294
|
+
* causation, or free of unobserved confounding: read `refutation.robustness_value`
|
|
295
|
+
* (E-value) and `refutation.expected_sign_ok` alongside it. */
|
|
222
296
|
readonly causal: NullType;
|
|
223
297
|
/** A small but real effect, or no clear effect after adjustment. */
|
|
224
298
|
readonly modest: NullType;
|
|
@@ -271,8 +345,21 @@ export declare const CausalExperimentResultType: StructType<{
|
|
|
271
345
|
readonly control_propensity: VectorType<FloatType>;
|
|
272
346
|
/** Fraction of rows inside the treated/control common support. */
|
|
273
347
|
readonly common_support_frac: FloatType;
|
|
274
|
-
/** Whether common support clears `min_overlap
|
|
348
|
+
/** Whether common support clears the **refuse** gate `min_overlap` — i.e. an
|
|
349
|
+
* adjusted estimate is attempted at all. NOT a quality signal: `true` at the
|
|
350
|
+
* default gate (0.10) still means barely-overlapping. Read `support_strength`
|
|
351
|
+
* for the graded tier. */
|
|
275
352
|
readonly positivity_ok: BooleanType;
|
|
353
|
+
/** Graded common-support tier (`refused` / `thin` / `strong` vs `strong_overlap`).
|
|
354
|
+
* twin: e3-ui OverlapDiagnosticType.support_strength */
|
|
355
|
+
readonly support_strength: VariantType<{
|
|
356
|
+
/** Below `min_overlap` — no like-for-like comparison (engine refuses). */
|
|
357
|
+
readonly refused: NullType;
|
|
358
|
+
/** Clears the refuse gate but below `strong_overlap` — fragile support. */
|
|
359
|
+
readonly thin: NullType;
|
|
360
|
+
/** Common support ≥ `strong_overlap` — solid. */
|
|
361
|
+
readonly strong: NullType;
|
|
362
|
+
}>;
|
|
276
363
|
}>;
|
|
277
364
|
readonly refutation: OptionType<StructType<{
|
|
278
365
|
/** Effect under a permuted (placebo) treatment — should be ≈ 0. */
|
|
@@ -285,13 +372,22 @@ export declare const CausalExperimentResultType: StructType<{
|
|
|
285
372
|
readonly data_subset_effect: OptionType<FloatType>;
|
|
286
373
|
/** Std of the effect across data subsamples. */
|
|
287
374
|
readonly data_subset_std: OptionType<FloatType>;
|
|
288
|
-
/** Closed-form E-value — confounder strength needed to
|
|
375
|
+
/** Closed-form E-value (risk-ratio scale) — the confounder strength needed to
|
|
376
|
+
* explain the effect away. A monotone transform of the standardized effect, so
|
|
377
|
+
* it is NOT independent of the effect size; read it as "how easily overturned",
|
|
378
|
+
* not as a separate confounding measure. */
|
|
289
379
|
readonly robustness_value: OptionType<FloatType>;
|
|
290
380
|
/** Unobserved-confounder sensitivity (tipping) curve: effect at each simulated strength. */
|
|
291
381
|
readonly sensitivity: OptionType<StructType<{
|
|
292
382
|
readonly strengths: VectorType<FloatType>;
|
|
293
383
|
readonly effects: VectorType<FloatType>;
|
|
294
384
|
}>>;
|
|
385
|
+
/** Sign-prior check (when `config.expected_sign` is set): `some(true)` if a
|
|
386
|
+
* material effect matches the expected direction, `some(false)` if it points the
|
|
387
|
+
* other way (→ verdict `adjustment_insufficient`). `none` when no prior is given
|
|
388
|
+
* or the effect is near-zero (its sign is undefined).
|
|
389
|
+
* twin: e3-ui RefutationType.expected_sign_ok */
|
|
390
|
+
readonly expected_sign_ok: OptionType<BooleanType>;
|
|
295
391
|
}>>;
|
|
296
392
|
/** ALE dose-response of `dose_feature` (present when `config.dose_feature` is set). */
|
|
297
393
|
readonly dose_response: OptionType<StructType<{
|
|
@@ -304,7 +400,10 @@ export declare const CausalExperimentResultType: StructType<{
|
|
|
304
400
|
readonly size: VectorType<IntegerType>;
|
|
305
401
|
}>>;
|
|
306
402
|
readonly verdict: VariantType<{
|
|
307
|
-
/** A real, robust, material effect
|
|
403
|
+
/** A real, robust, material effect — robust to the **observed** backdoor set + the
|
|
404
|
+
* refuters that were run. It does NOT mean correctly-signed, free of reverse
|
|
405
|
+
* causation, or free of unobserved confounding: read `refutation.robustness_value`
|
|
406
|
+
* (E-value) and `refutation.expected_sign_ok` alongside it. */
|
|
308
407
|
readonly causal: NullType;
|
|
309
408
|
/** A small but real effect, or no clear effect after adjustment. */
|
|
310
409
|
readonly modest: NullType;
|
|
@@ -388,6 +487,23 @@ export declare const causal_experiment: import("@elaraai/east").GenericPlatformD
|
|
|
388
487
|
}>>;
|
|
389
488
|
/** Random seed. */
|
|
390
489
|
readonly random_state: OptionType<IntegerType>;
|
|
490
|
+
/** Graded-overlap threshold — common support below this keeps `causal` from the
|
|
491
|
+
* top tier (verdict `modest`, `overlap.support_strength = thin`); default 0.55. */
|
|
492
|
+
readonly strong_overlap: OptionType<FloatType>;
|
|
493
|
+
/** Robustness floor — when set, a `causal` verdict whose E-value
|
|
494
|
+
* (`refutation.robustness_value`, risk-ratio scale) is below this is downgraded to
|
|
495
|
+
* `modest`. Off by default. The E-value is a monotone transform of the standardized
|
|
496
|
+
* effect, so this acts as a stricter materiality bar, not an independent check. */
|
|
497
|
+
readonly evalue_floor: OptionType<FloatType>;
|
|
498
|
+
/** Directional prior — when set, a material, CI-clear effect of the opposite sign is
|
|
499
|
+
* flagged (`refutation.expected_sign_ok = some(false)`, verdict `adjustment_insufficient`).
|
|
500
|
+
* Off by default. Catches reverse causation / reactive assignment the refuters can't. */
|
|
501
|
+
readonly expected_sign: OptionType<VariantType<{
|
|
502
|
+
/** The effect is expected to increase the outcome. */
|
|
503
|
+
readonly positive: NullType;
|
|
504
|
+
/** The effect is expected to decrease the outcome. */
|
|
505
|
+
readonly negative: NullType;
|
|
506
|
+
}>>;
|
|
391
507
|
}>], StructType<{
|
|
392
508
|
/** The raw (unadjusted) mean difference — always computable. */
|
|
393
509
|
readonly naive: FloatType;
|
|
@@ -425,8 +541,21 @@ export declare const causal_experiment: import("@elaraai/east").GenericPlatformD
|
|
|
425
541
|
readonly control_propensity: VectorType<FloatType>;
|
|
426
542
|
/** Fraction of rows inside the treated/control common support. */
|
|
427
543
|
readonly common_support_frac: FloatType;
|
|
428
|
-
/** Whether common support clears `min_overlap
|
|
544
|
+
/** Whether common support clears the **refuse** gate `min_overlap` — i.e. an
|
|
545
|
+
* adjusted estimate is attempted at all. NOT a quality signal: `true` at the
|
|
546
|
+
* default gate (0.10) still means barely-overlapping. Read `support_strength`
|
|
547
|
+
* for the graded tier. */
|
|
429
548
|
readonly positivity_ok: BooleanType;
|
|
549
|
+
/** Graded common-support tier (`refused` / `thin` / `strong` vs `strong_overlap`).
|
|
550
|
+
* twin: e3-ui OverlapDiagnosticType.support_strength */
|
|
551
|
+
readonly support_strength: VariantType<{
|
|
552
|
+
/** Below `min_overlap` — no like-for-like comparison (engine refuses). */
|
|
553
|
+
readonly refused: NullType;
|
|
554
|
+
/** Clears the refuse gate but below `strong_overlap` — fragile support. */
|
|
555
|
+
readonly thin: NullType;
|
|
556
|
+
/** Common support ≥ `strong_overlap` — solid. */
|
|
557
|
+
readonly strong: NullType;
|
|
558
|
+
}>;
|
|
430
559
|
}>;
|
|
431
560
|
readonly refutation: OptionType<StructType<{
|
|
432
561
|
/** Effect under a permuted (placebo) treatment — should be ≈ 0. */
|
|
@@ -439,13 +568,22 @@ export declare const causal_experiment: import("@elaraai/east").GenericPlatformD
|
|
|
439
568
|
readonly data_subset_effect: OptionType<FloatType>;
|
|
440
569
|
/** Std of the effect across data subsamples. */
|
|
441
570
|
readonly data_subset_std: OptionType<FloatType>;
|
|
442
|
-
/** Closed-form E-value — confounder strength needed to
|
|
571
|
+
/** Closed-form E-value (risk-ratio scale) — the confounder strength needed to
|
|
572
|
+
* explain the effect away. A monotone transform of the standardized effect, so
|
|
573
|
+
* it is NOT independent of the effect size; read it as "how easily overturned",
|
|
574
|
+
* not as a separate confounding measure. */
|
|
443
575
|
readonly robustness_value: OptionType<FloatType>;
|
|
444
576
|
/** Unobserved-confounder sensitivity (tipping) curve: effect at each simulated strength. */
|
|
445
577
|
readonly sensitivity: OptionType<StructType<{
|
|
446
578
|
readonly strengths: VectorType<FloatType>;
|
|
447
579
|
readonly effects: VectorType<FloatType>;
|
|
448
580
|
}>>;
|
|
581
|
+
/** Sign-prior check (when `config.expected_sign` is set): `some(true)` if a
|
|
582
|
+
* material effect matches the expected direction, `some(false)` if it points the
|
|
583
|
+
* other way (→ verdict `adjustment_insufficient`). `none` when no prior is given
|
|
584
|
+
* or the effect is near-zero (its sign is undefined).
|
|
585
|
+
* twin: e3-ui RefutationType.expected_sign_ok */
|
|
586
|
+
readonly expected_sign_ok: OptionType<BooleanType>;
|
|
449
587
|
}>>;
|
|
450
588
|
/** ALE dose-response of `dose_feature` (present when `config.dose_feature` is set). */
|
|
451
589
|
readonly dose_response: OptionType<StructType<{
|
|
@@ -458,7 +596,10 @@ export declare const causal_experiment: import("@elaraai/east").GenericPlatformD
|
|
|
458
596
|
readonly size: VectorType<IntegerType>;
|
|
459
597
|
}>>;
|
|
460
598
|
readonly verdict: VariantType<{
|
|
461
|
-
/** A real, robust, material effect
|
|
599
|
+
/** A real, robust, material effect — robust to the **observed** backdoor set + the
|
|
600
|
+
* refuters that were run. It does NOT mean correctly-signed, free of reverse
|
|
601
|
+
* causation, or free of unobserved confounding: read `refutation.robustness_value`
|
|
602
|
+
* (E-value) and `refutation.expected_sign_ok` alongside it. */
|
|
462
603
|
readonly causal: NullType;
|
|
463
604
|
/** A small but real effect, or no clear effect after adjustment. */
|
|
464
605
|
readonly modest: NullType;
|
|
@@ -504,7 +645,10 @@ export declare const PowerCurveType: StructType<{
|
|
|
504
645
|
*/
|
|
505
646
|
export declare const ExperimentDesignType: StructType<{
|
|
506
647
|
readonly verdict: VariantType<{
|
|
507
|
-
/** A real, robust, material effect
|
|
648
|
+
/** A real, robust, material effect — robust to the **observed** backdoor set + the
|
|
649
|
+
* refuters that were run. It does NOT mean correctly-signed, free of reverse
|
|
650
|
+
* causation, or free of unobserved confounding: read `refutation.robustness_value`
|
|
651
|
+
* (E-value) and `refutation.expected_sign_ok` alongside it. */
|
|
508
652
|
readonly causal: NullType;
|
|
509
653
|
/** A small but real effect, or no clear effect after adjustment. */
|
|
510
654
|
readonly modest: NullType;
|
|
@@ -641,6 +785,23 @@ export declare const causal_design_validation: import("@elaraai/east").GenericPl
|
|
|
641
785
|
}>>;
|
|
642
786
|
/** Random seed. */
|
|
643
787
|
readonly random_state: OptionType<IntegerType>;
|
|
788
|
+
/** Graded-overlap threshold — common support below this keeps `causal` from the
|
|
789
|
+
* top tier (verdict `modest`, `overlap.support_strength = thin`); default 0.55. */
|
|
790
|
+
readonly strong_overlap: OptionType<FloatType>;
|
|
791
|
+
/** Robustness floor — when set, a `causal` verdict whose E-value
|
|
792
|
+
* (`refutation.robustness_value`, risk-ratio scale) is below this is downgraded to
|
|
793
|
+
* `modest`. Off by default. The E-value is a monotone transform of the standardized
|
|
794
|
+
* effect, so this acts as a stricter materiality bar, not an independent check. */
|
|
795
|
+
readonly evalue_floor: OptionType<FloatType>;
|
|
796
|
+
/** Directional prior — when set, a material, CI-clear effect of the opposite sign is
|
|
797
|
+
* flagged (`refutation.expected_sign_ok = some(false)`, verdict `adjustment_insufficient`).
|
|
798
|
+
* Off by default. Catches reverse causation / reactive assignment the refuters can't. */
|
|
799
|
+
readonly expected_sign: OptionType<VariantType<{
|
|
800
|
+
/** The effect is expected to increase the outcome. */
|
|
801
|
+
readonly positive: NullType;
|
|
802
|
+
/** The effect is expected to decrease the outcome. */
|
|
803
|
+
readonly negative: NullType;
|
|
804
|
+
}>>;
|
|
644
805
|
}>, StructType<{
|
|
645
806
|
/** The raw (unadjusted) mean difference — always computable. */
|
|
646
807
|
readonly naive: FloatType;
|
|
@@ -678,8 +839,21 @@ export declare const causal_design_validation: import("@elaraai/east").GenericPl
|
|
|
678
839
|
readonly control_propensity: VectorType<FloatType>;
|
|
679
840
|
/** Fraction of rows inside the treated/control common support. */
|
|
680
841
|
readonly common_support_frac: FloatType;
|
|
681
|
-
/** Whether common support clears `min_overlap
|
|
842
|
+
/** Whether common support clears the **refuse** gate `min_overlap` — i.e. an
|
|
843
|
+
* adjusted estimate is attempted at all. NOT a quality signal: `true` at the
|
|
844
|
+
* default gate (0.10) still means barely-overlapping. Read `support_strength`
|
|
845
|
+
* for the graded tier. */
|
|
682
846
|
readonly positivity_ok: BooleanType;
|
|
847
|
+
/** Graded common-support tier (`refused` / `thin` / `strong` vs `strong_overlap`).
|
|
848
|
+
* twin: e3-ui OverlapDiagnosticType.support_strength */
|
|
849
|
+
readonly support_strength: VariantType<{
|
|
850
|
+
/** Below `min_overlap` — no like-for-like comparison (engine refuses). */
|
|
851
|
+
readonly refused: NullType;
|
|
852
|
+
/** Clears the refuse gate but below `strong_overlap` — fragile support. */
|
|
853
|
+
readonly thin: NullType;
|
|
854
|
+
/** Common support ≥ `strong_overlap` — solid. */
|
|
855
|
+
readonly strong: NullType;
|
|
856
|
+
}>;
|
|
683
857
|
}>;
|
|
684
858
|
readonly refutation: OptionType<StructType<{
|
|
685
859
|
/** Effect under a permuted (placebo) treatment — should be ≈ 0. */
|
|
@@ -692,13 +866,22 @@ export declare const causal_design_validation: import("@elaraai/east").GenericPl
|
|
|
692
866
|
readonly data_subset_effect: OptionType<FloatType>;
|
|
693
867
|
/** Std of the effect across data subsamples. */
|
|
694
868
|
readonly data_subset_std: OptionType<FloatType>;
|
|
695
|
-
/** Closed-form E-value — confounder strength needed to
|
|
869
|
+
/** Closed-form E-value (risk-ratio scale) — the confounder strength needed to
|
|
870
|
+
* explain the effect away. A monotone transform of the standardized effect, so
|
|
871
|
+
* it is NOT independent of the effect size; read it as "how easily overturned",
|
|
872
|
+
* not as a separate confounding measure. */
|
|
696
873
|
readonly robustness_value: OptionType<FloatType>;
|
|
697
874
|
/** Unobserved-confounder sensitivity (tipping) curve: effect at each simulated strength. */
|
|
698
875
|
readonly sensitivity: OptionType<StructType<{
|
|
699
876
|
readonly strengths: VectorType<FloatType>;
|
|
700
877
|
readonly effects: VectorType<FloatType>;
|
|
701
878
|
}>>;
|
|
879
|
+
/** Sign-prior check (when `config.expected_sign` is set): `some(true)` if a
|
|
880
|
+
* material effect matches the expected direction, `some(false)` if it points the
|
|
881
|
+
* other way (→ verdict `adjustment_insufficient`). `none` when no prior is given
|
|
882
|
+
* or the effect is near-zero (its sign is undefined).
|
|
883
|
+
* twin: e3-ui RefutationType.expected_sign_ok */
|
|
884
|
+
readonly expected_sign_ok: OptionType<BooleanType>;
|
|
702
885
|
}>>;
|
|
703
886
|
/** ALE dose-response of `dose_feature` (present when `config.dose_feature` is set). */
|
|
704
887
|
readonly dose_response: OptionType<StructType<{
|
|
@@ -711,7 +894,10 @@ export declare const causal_design_validation: import("@elaraai/east").GenericPl
|
|
|
711
894
|
readonly size: VectorType<IntegerType>;
|
|
712
895
|
}>>;
|
|
713
896
|
readonly verdict: VariantType<{
|
|
714
|
-
/** A real, robust, material effect
|
|
897
|
+
/** A real, robust, material effect — robust to the **observed** backdoor set + the
|
|
898
|
+
* refuters that were run. It does NOT mean correctly-signed, free of reverse
|
|
899
|
+
* causation, or free of unobserved confounding: read `refutation.robustness_value`
|
|
900
|
+
* (E-value) and `refutation.expected_sign_ok` alongside it. */
|
|
715
901
|
readonly causal: NullType;
|
|
716
902
|
/** A small but real effect, or no clear effect after adjustment. */
|
|
717
903
|
readonly modest: NullType;
|
|
@@ -733,7 +919,10 @@ export declare const causal_design_validation: import("@elaraai/east").GenericPl
|
|
|
733
919
|
readonly treated_shares: OptionType<ArrayType<FloatType>>;
|
|
734
920
|
}>], StructType<{
|
|
735
921
|
readonly verdict: VariantType<{
|
|
736
|
-
/** A real, robust, material effect
|
|
922
|
+
/** A real, robust, material effect — robust to the **observed** backdoor set + the
|
|
923
|
+
* refuters that were run. It does NOT mean correctly-signed, free of reverse
|
|
924
|
+
* causation, or free of unobserved confounding: read `refutation.robustness_value`
|
|
925
|
+
* (E-value) and `refutation.expected_sign_ok` alongside it. */
|
|
737
926
|
readonly causal: NullType;
|
|
738
927
|
/** A small but real effect, or no clear effect after adjustment. */
|
|
739
928
|
readonly modest: NullType;
|
|
@@ -817,6 +1006,12 @@ export declare const CausalTypes: {
|
|
|
817
1006
|
/** Average treatment effect on the controls */
|
|
818
1007
|
readonly atc: NullType;
|
|
819
1008
|
}>;
|
|
1009
|
+
readonly CausalSignType: VariantType<{
|
|
1010
|
+
/** The effect is expected to increase the outcome. */
|
|
1011
|
+
readonly positive: NullType;
|
|
1012
|
+
/** The effect is expected to decrease the outcome. */
|
|
1013
|
+
readonly negative: NullType;
|
|
1014
|
+
}>;
|
|
820
1015
|
readonly CausalBootstrapConfigType: StructType<{
|
|
821
1016
|
/** Number of bootstrap replicates (default 200) */
|
|
822
1017
|
readonly reps: IntegerType;
|
|
@@ -902,6 +1097,23 @@ export declare const CausalTypes: {
|
|
|
902
1097
|
}>>;
|
|
903
1098
|
/** Random seed. */
|
|
904
1099
|
readonly random_state: OptionType<IntegerType>;
|
|
1100
|
+
/** Graded-overlap threshold — common support below this keeps `causal` from the
|
|
1101
|
+
* top tier (verdict `modest`, `overlap.support_strength = thin`); default 0.55. */
|
|
1102
|
+
readonly strong_overlap: OptionType<FloatType>;
|
|
1103
|
+
/** Robustness floor — when set, a `causal` verdict whose E-value
|
|
1104
|
+
* (`refutation.robustness_value`, risk-ratio scale) is below this is downgraded to
|
|
1105
|
+
* `modest`. Off by default. The E-value is a monotone transform of the standardized
|
|
1106
|
+
* effect, so this acts as a stricter materiality bar, not an independent check. */
|
|
1107
|
+
readonly evalue_floor: OptionType<FloatType>;
|
|
1108
|
+
/** Directional prior — when set, a material, CI-clear effect of the opposite sign is
|
|
1109
|
+
* flagged (`refutation.expected_sign_ok = some(false)`, verdict `adjustment_insufficient`).
|
|
1110
|
+
* Off by default. Catches reverse causation / reactive assignment the refuters can't. */
|
|
1111
|
+
readonly expected_sign: OptionType<VariantType<{
|
|
1112
|
+
/** The effect is expected to increase the outcome. */
|
|
1113
|
+
readonly positive: NullType;
|
|
1114
|
+
/** The effect is expected to decrease the outcome. */
|
|
1115
|
+
readonly negative: NullType;
|
|
1116
|
+
}>>;
|
|
905
1117
|
}>;
|
|
906
1118
|
readonly BalanceRowType: StructType<{
|
|
907
1119
|
readonly column: StringType;
|
|
@@ -913,6 +1125,14 @@ export declare const CausalTypes: {
|
|
|
913
1125
|
/** Standardized mean difference, (mt-mc)/sqrt((vt+vc)/2). */
|
|
914
1126
|
readonly std_diff: FloatType;
|
|
915
1127
|
}>;
|
|
1128
|
+
readonly SupportStrengthType: VariantType<{
|
|
1129
|
+
/** Below `min_overlap` — no like-for-like comparison (engine refuses). */
|
|
1130
|
+
readonly refused: NullType;
|
|
1131
|
+
/** Clears the refuse gate but below `strong_overlap` — fragile support. */
|
|
1132
|
+
readonly thin: NullType;
|
|
1133
|
+
/** Common support ≥ `strong_overlap` — solid. */
|
|
1134
|
+
readonly strong: NullType;
|
|
1135
|
+
}>;
|
|
916
1136
|
readonly OverlapDiagnosticType: StructType<{
|
|
917
1137
|
/** Propensity histogram (20 bins over [0,1]) for the treated arm. */
|
|
918
1138
|
readonly treated_propensity: VectorType<FloatType>;
|
|
@@ -920,8 +1140,21 @@ export declare const CausalTypes: {
|
|
|
920
1140
|
readonly control_propensity: VectorType<FloatType>;
|
|
921
1141
|
/** Fraction of rows inside the treated/control common support. */
|
|
922
1142
|
readonly common_support_frac: FloatType;
|
|
923
|
-
/** Whether common support clears `min_overlap
|
|
1143
|
+
/** Whether common support clears the **refuse** gate `min_overlap` — i.e. an
|
|
1144
|
+
* adjusted estimate is attempted at all. NOT a quality signal: `true` at the
|
|
1145
|
+
* default gate (0.10) still means barely-overlapping. Read `support_strength`
|
|
1146
|
+
* for the graded tier. */
|
|
924
1147
|
readonly positivity_ok: BooleanType;
|
|
1148
|
+
/** Graded common-support tier (`refused` / `thin` / `strong` vs `strong_overlap`).
|
|
1149
|
+
* twin: e3-ui OverlapDiagnosticType.support_strength */
|
|
1150
|
+
readonly support_strength: VariantType<{
|
|
1151
|
+
/** Below `min_overlap` — no like-for-like comparison (engine refuses). */
|
|
1152
|
+
readonly refused: NullType;
|
|
1153
|
+
/** Clears the refuse gate but below `strong_overlap` — fragile support. */
|
|
1154
|
+
readonly thin: NullType;
|
|
1155
|
+
/** Common support ≥ `strong_overlap` — solid. */
|
|
1156
|
+
readonly strong: NullType;
|
|
1157
|
+
}>;
|
|
925
1158
|
}>;
|
|
926
1159
|
readonly RefutationType: StructType<{
|
|
927
1160
|
/** Effect under a permuted (placebo) treatment — should be ≈ 0. */
|
|
@@ -934,13 +1167,22 @@ export declare const CausalTypes: {
|
|
|
934
1167
|
readonly data_subset_effect: OptionType<FloatType>;
|
|
935
1168
|
/** Std of the effect across data subsamples. */
|
|
936
1169
|
readonly data_subset_std: OptionType<FloatType>;
|
|
937
|
-
/** Closed-form E-value — confounder strength needed to
|
|
1170
|
+
/** Closed-form E-value (risk-ratio scale) — the confounder strength needed to
|
|
1171
|
+
* explain the effect away. A monotone transform of the standardized effect, so
|
|
1172
|
+
* it is NOT independent of the effect size; read it as "how easily overturned",
|
|
1173
|
+
* not as a separate confounding measure. */
|
|
938
1174
|
readonly robustness_value: OptionType<FloatType>;
|
|
939
1175
|
/** Unobserved-confounder sensitivity (tipping) curve: effect at each simulated strength. */
|
|
940
1176
|
readonly sensitivity: OptionType<StructType<{
|
|
941
1177
|
readonly strengths: VectorType<FloatType>;
|
|
942
1178
|
readonly effects: VectorType<FloatType>;
|
|
943
1179
|
}>>;
|
|
1180
|
+
/** Sign-prior check (when `config.expected_sign` is set): `some(true)` if a
|
|
1181
|
+
* material effect matches the expected direction, `some(false)` if it points the
|
|
1182
|
+
* other way (→ verdict `adjustment_insufficient`). `none` when no prior is given
|
|
1183
|
+
* or the effect is near-zero (its sign is undefined).
|
|
1184
|
+
* twin: e3-ui RefutationType.expected_sign_ok */
|
|
1185
|
+
readonly expected_sign_ok: OptionType<BooleanType>;
|
|
944
1186
|
}>;
|
|
945
1187
|
readonly DoseResponseType: StructType<{
|
|
946
1188
|
readonly feature: StringType;
|
|
@@ -952,7 +1194,10 @@ export declare const CausalTypes: {
|
|
|
952
1194
|
readonly size: VectorType<IntegerType>;
|
|
953
1195
|
}>;
|
|
954
1196
|
readonly ExperimentVerdictType: VariantType<{
|
|
955
|
-
/** A real, robust, material effect
|
|
1197
|
+
/** A real, robust, material effect — robust to the **observed** backdoor set + the
|
|
1198
|
+
* refuters that were run. It does NOT mean correctly-signed, free of reverse
|
|
1199
|
+
* causation, or free of unobserved confounding: read `refutation.robustness_value`
|
|
1200
|
+
* (E-value) and `refutation.expected_sign_ok` alongside it. */
|
|
956
1201
|
readonly causal: NullType;
|
|
957
1202
|
/** A small but real effect, or no clear effect after adjustment. */
|
|
958
1203
|
readonly modest: NullType;
|
|
@@ -1000,8 +1245,21 @@ export declare const CausalTypes: {
|
|
|
1000
1245
|
readonly control_propensity: VectorType<FloatType>;
|
|
1001
1246
|
/** Fraction of rows inside the treated/control common support. */
|
|
1002
1247
|
readonly common_support_frac: FloatType;
|
|
1003
|
-
/** Whether common support clears `min_overlap
|
|
1248
|
+
/** Whether common support clears the **refuse** gate `min_overlap` — i.e. an
|
|
1249
|
+
* adjusted estimate is attempted at all. NOT a quality signal: `true` at the
|
|
1250
|
+
* default gate (0.10) still means barely-overlapping. Read `support_strength`
|
|
1251
|
+
* for the graded tier. */
|
|
1004
1252
|
readonly positivity_ok: BooleanType;
|
|
1253
|
+
/** Graded common-support tier (`refused` / `thin` / `strong` vs `strong_overlap`).
|
|
1254
|
+
* twin: e3-ui OverlapDiagnosticType.support_strength */
|
|
1255
|
+
readonly support_strength: VariantType<{
|
|
1256
|
+
/** Below `min_overlap` — no like-for-like comparison (engine refuses). */
|
|
1257
|
+
readonly refused: NullType;
|
|
1258
|
+
/** Clears the refuse gate but below `strong_overlap` — fragile support. */
|
|
1259
|
+
readonly thin: NullType;
|
|
1260
|
+
/** Common support ≥ `strong_overlap` — solid. */
|
|
1261
|
+
readonly strong: NullType;
|
|
1262
|
+
}>;
|
|
1005
1263
|
}>;
|
|
1006
1264
|
readonly refutation: OptionType<StructType<{
|
|
1007
1265
|
/** Effect under a permuted (placebo) treatment — should be ≈ 0. */
|
|
@@ -1014,13 +1272,22 @@ export declare const CausalTypes: {
|
|
|
1014
1272
|
readonly data_subset_effect: OptionType<FloatType>;
|
|
1015
1273
|
/** Std of the effect across data subsamples. */
|
|
1016
1274
|
readonly data_subset_std: OptionType<FloatType>;
|
|
1017
|
-
/** Closed-form E-value — confounder strength needed to
|
|
1275
|
+
/** Closed-form E-value (risk-ratio scale) — the confounder strength needed to
|
|
1276
|
+
* explain the effect away. A monotone transform of the standardized effect, so
|
|
1277
|
+
* it is NOT independent of the effect size; read it as "how easily overturned",
|
|
1278
|
+
* not as a separate confounding measure. */
|
|
1018
1279
|
readonly robustness_value: OptionType<FloatType>;
|
|
1019
1280
|
/** Unobserved-confounder sensitivity (tipping) curve: effect at each simulated strength. */
|
|
1020
1281
|
readonly sensitivity: OptionType<StructType<{
|
|
1021
1282
|
readonly strengths: VectorType<FloatType>;
|
|
1022
1283
|
readonly effects: VectorType<FloatType>;
|
|
1023
1284
|
}>>;
|
|
1285
|
+
/** Sign-prior check (when `config.expected_sign` is set): `some(true)` if a
|
|
1286
|
+
* material effect matches the expected direction, `some(false)` if it points the
|
|
1287
|
+
* other way (→ verdict `adjustment_insufficient`). `none` when no prior is given
|
|
1288
|
+
* or the effect is near-zero (its sign is undefined).
|
|
1289
|
+
* twin: e3-ui RefutationType.expected_sign_ok */
|
|
1290
|
+
readonly expected_sign_ok: OptionType<BooleanType>;
|
|
1024
1291
|
}>>;
|
|
1025
1292
|
/** ALE dose-response of `dose_feature` (present when `config.dose_feature` is set). */
|
|
1026
1293
|
readonly dose_response: OptionType<StructType<{
|
|
@@ -1033,7 +1300,10 @@ export declare const CausalTypes: {
|
|
|
1033
1300
|
readonly size: VectorType<IntegerType>;
|
|
1034
1301
|
}>>;
|
|
1035
1302
|
readonly verdict: VariantType<{
|
|
1036
|
-
/** A real, robust, material effect
|
|
1303
|
+
/** A real, robust, material effect — robust to the **observed** backdoor set + the
|
|
1304
|
+
* refuters that were run. It does NOT mean correctly-signed, free of reverse
|
|
1305
|
+
* causation, or free of unobserved confounding: read `refutation.robustness_value`
|
|
1306
|
+
* (E-value) and `refutation.expected_sign_ok` alongside it. */
|
|
1037
1307
|
readonly causal: NullType;
|
|
1038
1308
|
/** A small but real effect, or no clear effect after adjustment. */
|
|
1039
1309
|
readonly modest: NullType;
|
|
@@ -1071,7 +1341,10 @@ export declare const CausalTypes: {
|
|
|
1071
1341
|
}>;
|
|
1072
1342
|
readonly ExperimentDesignType: StructType<{
|
|
1073
1343
|
readonly verdict: VariantType<{
|
|
1074
|
-
/** A real, robust, material effect
|
|
1344
|
+
/** A real, robust, material effect — robust to the **observed** backdoor set + the
|
|
1345
|
+
* refuters that were run. It does NOT mean correctly-signed, free of reverse
|
|
1346
|
+
* causation, or free of unobserved confounding: read `refutation.robustness_value`
|
|
1347
|
+
* (E-value) and `refutation.expected_sign_ok` alongside it. */
|
|
1075
1348
|
readonly causal: NullType;
|
|
1076
1349
|
/** A small but real effect, or no clear effect after adjustment. */
|
|
1077
1350
|
readonly modest: NullType;
|
|
@@ -1142,6 +1415,14 @@ export declare const CausalTypes: {
|
|
|
1142
1415
|
* / `not_estimable`). It refuses (`adjusted = none`) when the data can't support
|
|
1143
1416
|
* an estimate. DoWhy / EconML / PyALE are internal implementation it composes.
|
|
1144
1417
|
*
|
|
1418
|
+
* `causal` means robust to the **observed** backdoor set + the refuters that ran —
|
|
1419
|
+
* NOT correctly-signed, free of reverse causation, or free of unobserved confounding.
|
|
1420
|
+
* The graded `overlap.support_strength` (`refused`/`thin`/`strong`) tempers a thin-support
|
|
1421
|
+
* result to `modest`; an opt-in `evalue_floor` folds a weak E-value into `modest`; an
|
|
1422
|
+
* opt-in `expected_sign` prior flags an implausibly-signed effect (`adjustment_insufficient`,
|
|
1423
|
+
* `refutation.expected_sign_ok = some(false)`). A reactively-assigned treatment needs a
|
|
1424
|
+
* design-based strategy (IV / within-unit pre-period) — see `designValidation`.
|
|
1425
|
+
*
|
|
1145
1426
|
* @example
|
|
1146
1427
|
* ```ts
|
|
1147
1428
|
* import { East, ArrayType, StructType, FloatType, BooleanType, variant } from "@elaraai/east";
|
|
@@ -1225,6 +1506,23 @@ export declare const Causal: {
|
|
|
1225
1506
|
}>>;
|
|
1226
1507
|
/** Random seed. */
|
|
1227
1508
|
readonly random_state: OptionType<IntegerType>;
|
|
1509
|
+
/** Graded-overlap threshold — common support below this keeps `causal` from the
|
|
1510
|
+
* top tier (verdict `modest`, `overlap.support_strength = thin`); default 0.55. */
|
|
1511
|
+
readonly strong_overlap: OptionType<FloatType>;
|
|
1512
|
+
/** Robustness floor — when set, a `causal` verdict whose E-value
|
|
1513
|
+
* (`refutation.robustness_value`, risk-ratio scale) is below this is downgraded to
|
|
1514
|
+
* `modest`. Off by default. The E-value is a monotone transform of the standardized
|
|
1515
|
+
* effect, so this acts as a stricter materiality bar, not an independent check. */
|
|
1516
|
+
readonly evalue_floor: OptionType<FloatType>;
|
|
1517
|
+
/** Directional prior — when set, a material, CI-clear effect of the opposite sign is
|
|
1518
|
+
* flagged (`refutation.expected_sign_ok = some(false)`, verdict `adjustment_insufficient`).
|
|
1519
|
+
* Off by default. Catches reverse causation / reactive assignment the refuters can't. */
|
|
1520
|
+
readonly expected_sign: OptionType<VariantType<{
|
|
1521
|
+
/** The effect is expected to increase the outcome. */
|
|
1522
|
+
readonly positive: NullType;
|
|
1523
|
+
/** The effect is expected to decrease the outcome. */
|
|
1524
|
+
readonly negative: NullType;
|
|
1525
|
+
}>>;
|
|
1228
1526
|
}>], StructType<{
|
|
1229
1527
|
/** The raw (unadjusted) mean difference — always computable. */
|
|
1230
1528
|
readonly naive: FloatType;
|
|
@@ -1262,8 +1560,21 @@ export declare const Causal: {
|
|
|
1262
1560
|
readonly control_propensity: VectorType<FloatType>;
|
|
1263
1561
|
/** Fraction of rows inside the treated/control common support. */
|
|
1264
1562
|
readonly common_support_frac: FloatType;
|
|
1265
|
-
/** Whether common support clears `min_overlap
|
|
1563
|
+
/** Whether common support clears the **refuse** gate `min_overlap` — i.e. an
|
|
1564
|
+
* adjusted estimate is attempted at all. NOT a quality signal: `true` at the
|
|
1565
|
+
* default gate (0.10) still means barely-overlapping. Read `support_strength`
|
|
1566
|
+
* for the graded tier. */
|
|
1266
1567
|
readonly positivity_ok: BooleanType;
|
|
1568
|
+
/** Graded common-support tier (`refused` / `thin` / `strong` vs `strong_overlap`).
|
|
1569
|
+
* twin: e3-ui OverlapDiagnosticType.support_strength */
|
|
1570
|
+
readonly support_strength: VariantType<{
|
|
1571
|
+
/** Below `min_overlap` — no like-for-like comparison (engine refuses). */
|
|
1572
|
+
readonly refused: NullType;
|
|
1573
|
+
/** Clears the refuse gate but below `strong_overlap` — fragile support. */
|
|
1574
|
+
readonly thin: NullType;
|
|
1575
|
+
/** Common support ≥ `strong_overlap` — solid. */
|
|
1576
|
+
readonly strong: NullType;
|
|
1577
|
+
}>;
|
|
1267
1578
|
}>;
|
|
1268
1579
|
readonly refutation: OptionType<StructType<{
|
|
1269
1580
|
/** Effect under a permuted (placebo) treatment — should be ≈ 0. */
|
|
@@ -1276,13 +1587,22 @@ export declare const Causal: {
|
|
|
1276
1587
|
readonly data_subset_effect: OptionType<FloatType>;
|
|
1277
1588
|
/** Std of the effect across data subsamples. */
|
|
1278
1589
|
readonly data_subset_std: OptionType<FloatType>;
|
|
1279
|
-
/** Closed-form E-value — confounder strength needed to
|
|
1590
|
+
/** Closed-form E-value (risk-ratio scale) — the confounder strength needed to
|
|
1591
|
+
* explain the effect away. A monotone transform of the standardized effect, so
|
|
1592
|
+
* it is NOT independent of the effect size; read it as "how easily overturned",
|
|
1593
|
+
* not as a separate confounding measure. */
|
|
1280
1594
|
readonly robustness_value: OptionType<FloatType>;
|
|
1281
1595
|
/** Unobserved-confounder sensitivity (tipping) curve: effect at each simulated strength. */
|
|
1282
1596
|
readonly sensitivity: OptionType<StructType<{
|
|
1283
1597
|
readonly strengths: VectorType<FloatType>;
|
|
1284
1598
|
readonly effects: VectorType<FloatType>;
|
|
1285
1599
|
}>>;
|
|
1600
|
+
/** Sign-prior check (when `config.expected_sign` is set): `some(true)` if a
|
|
1601
|
+
* material effect matches the expected direction, `some(false)` if it points the
|
|
1602
|
+
* other way (→ verdict `adjustment_insufficient`). `none` when no prior is given
|
|
1603
|
+
* or the effect is near-zero (its sign is undefined).
|
|
1604
|
+
* twin: e3-ui RefutationType.expected_sign_ok */
|
|
1605
|
+
readonly expected_sign_ok: OptionType<BooleanType>;
|
|
1286
1606
|
}>>;
|
|
1287
1607
|
/** ALE dose-response of `dose_feature` (present when `config.dose_feature` is set). */
|
|
1288
1608
|
readonly dose_response: OptionType<StructType<{
|
|
@@ -1295,7 +1615,10 @@ export declare const Causal: {
|
|
|
1295
1615
|
readonly size: VectorType<IntegerType>;
|
|
1296
1616
|
}>>;
|
|
1297
1617
|
readonly verdict: VariantType<{
|
|
1298
|
-
/** A real, robust, material effect
|
|
1618
|
+
/** A real, robust, material effect — robust to the **observed** backdoor set + the
|
|
1619
|
+
* refuters that were run. It does NOT mean correctly-signed, free of reverse
|
|
1620
|
+
* causation, or free of unobserved confounding: read `refutation.robustness_value`
|
|
1621
|
+
* (E-value) and `refutation.expected_sign_ok` alongside it. */
|
|
1299
1622
|
readonly causal: NullType;
|
|
1300
1623
|
/** A small but real effect, or no clear effect after adjustment. */
|
|
1301
1624
|
readonly modest: NullType;
|
|
@@ -1371,6 +1694,23 @@ export declare const Causal: {
|
|
|
1371
1694
|
}>>;
|
|
1372
1695
|
/** Random seed. */
|
|
1373
1696
|
readonly random_state: OptionType<IntegerType>;
|
|
1697
|
+
/** Graded-overlap threshold — common support below this keeps `causal` from the
|
|
1698
|
+
* top tier (verdict `modest`, `overlap.support_strength = thin`); default 0.55. */
|
|
1699
|
+
readonly strong_overlap: OptionType<FloatType>;
|
|
1700
|
+
/** Robustness floor — when set, a `causal` verdict whose E-value
|
|
1701
|
+
* (`refutation.robustness_value`, risk-ratio scale) is below this is downgraded to
|
|
1702
|
+
* `modest`. Off by default. The E-value is a monotone transform of the standardized
|
|
1703
|
+
* effect, so this acts as a stricter materiality bar, not an independent check. */
|
|
1704
|
+
readonly evalue_floor: OptionType<FloatType>;
|
|
1705
|
+
/** Directional prior — when set, a material, CI-clear effect of the opposite sign is
|
|
1706
|
+
* flagged (`refutation.expected_sign_ok = some(false)`, verdict `adjustment_insufficient`).
|
|
1707
|
+
* Off by default. Catches reverse causation / reactive assignment the refuters can't. */
|
|
1708
|
+
readonly expected_sign: OptionType<VariantType<{
|
|
1709
|
+
/** The effect is expected to increase the outcome. */
|
|
1710
|
+
readonly positive: NullType;
|
|
1711
|
+
/** The effect is expected to decrease the outcome. */
|
|
1712
|
+
readonly negative: NullType;
|
|
1713
|
+
}>>;
|
|
1374
1714
|
}>, StructType<{
|
|
1375
1715
|
/** The raw (unadjusted) mean difference — always computable. */
|
|
1376
1716
|
readonly naive: FloatType;
|
|
@@ -1408,8 +1748,21 @@ export declare const Causal: {
|
|
|
1408
1748
|
readonly control_propensity: VectorType<FloatType>;
|
|
1409
1749
|
/** Fraction of rows inside the treated/control common support. */
|
|
1410
1750
|
readonly common_support_frac: FloatType;
|
|
1411
|
-
/** Whether common support clears `min_overlap
|
|
1751
|
+
/** Whether common support clears the **refuse** gate `min_overlap` — i.e. an
|
|
1752
|
+
* adjusted estimate is attempted at all. NOT a quality signal: `true` at the
|
|
1753
|
+
* default gate (0.10) still means barely-overlapping. Read `support_strength`
|
|
1754
|
+
* for the graded tier. */
|
|
1412
1755
|
readonly positivity_ok: BooleanType;
|
|
1756
|
+
/** Graded common-support tier (`refused` / `thin` / `strong` vs `strong_overlap`).
|
|
1757
|
+
* twin: e3-ui OverlapDiagnosticType.support_strength */
|
|
1758
|
+
readonly support_strength: VariantType<{
|
|
1759
|
+
/** Below `min_overlap` — no like-for-like comparison (engine refuses). */
|
|
1760
|
+
readonly refused: NullType;
|
|
1761
|
+
/** Clears the refuse gate but below `strong_overlap` — fragile support. */
|
|
1762
|
+
readonly thin: NullType;
|
|
1763
|
+
/** Common support ≥ `strong_overlap` — solid. */
|
|
1764
|
+
readonly strong: NullType;
|
|
1765
|
+
}>;
|
|
1413
1766
|
}>;
|
|
1414
1767
|
readonly refutation: OptionType<StructType<{
|
|
1415
1768
|
/** Effect under a permuted (placebo) treatment — should be ≈ 0. */
|
|
@@ -1422,13 +1775,22 @@ export declare const Causal: {
|
|
|
1422
1775
|
readonly data_subset_effect: OptionType<FloatType>;
|
|
1423
1776
|
/** Std of the effect across data subsamples. */
|
|
1424
1777
|
readonly data_subset_std: OptionType<FloatType>;
|
|
1425
|
-
/** Closed-form E-value — confounder strength needed to
|
|
1778
|
+
/** Closed-form E-value (risk-ratio scale) — the confounder strength needed to
|
|
1779
|
+
* explain the effect away. A monotone transform of the standardized effect, so
|
|
1780
|
+
* it is NOT independent of the effect size; read it as "how easily overturned",
|
|
1781
|
+
* not as a separate confounding measure. */
|
|
1426
1782
|
readonly robustness_value: OptionType<FloatType>;
|
|
1427
1783
|
/** Unobserved-confounder sensitivity (tipping) curve: effect at each simulated strength. */
|
|
1428
1784
|
readonly sensitivity: OptionType<StructType<{
|
|
1429
1785
|
readonly strengths: VectorType<FloatType>;
|
|
1430
1786
|
readonly effects: VectorType<FloatType>;
|
|
1431
1787
|
}>>;
|
|
1788
|
+
/** Sign-prior check (when `config.expected_sign` is set): `some(true)` if a
|
|
1789
|
+
* material effect matches the expected direction, `some(false)` if it points the
|
|
1790
|
+
* other way (→ verdict `adjustment_insufficient`). `none` when no prior is given
|
|
1791
|
+
* or the effect is near-zero (its sign is undefined).
|
|
1792
|
+
* twin: e3-ui RefutationType.expected_sign_ok */
|
|
1793
|
+
readonly expected_sign_ok: OptionType<BooleanType>;
|
|
1432
1794
|
}>>;
|
|
1433
1795
|
/** ALE dose-response of `dose_feature` (present when `config.dose_feature` is set). */
|
|
1434
1796
|
readonly dose_response: OptionType<StructType<{
|
|
@@ -1441,7 +1803,10 @@ export declare const Causal: {
|
|
|
1441
1803
|
readonly size: VectorType<IntegerType>;
|
|
1442
1804
|
}>>;
|
|
1443
1805
|
readonly verdict: VariantType<{
|
|
1444
|
-
/** A real, robust, material effect
|
|
1806
|
+
/** A real, robust, material effect — robust to the **observed** backdoor set + the
|
|
1807
|
+
* refuters that were run. It does NOT mean correctly-signed, free of reverse
|
|
1808
|
+
* causation, or free of unobserved confounding: read `refutation.robustness_value`
|
|
1809
|
+
* (E-value) and `refutation.expected_sign_ok` alongside it. */
|
|
1445
1810
|
readonly causal: NullType;
|
|
1446
1811
|
/** A small but real effect, or no clear effect after adjustment. */
|
|
1447
1812
|
readonly modest: NullType;
|
|
@@ -1463,7 +1828,10 @@ export declare const Causal: {
|
|
|
1463
1828
|
readonly treated_shares: OptionType<ArrayType<FloatType>>;
|
|
1464
1829
|
}>], StructType<{
|
|
1465
1830
|
readonly verdict: VariantType<{
|
|
1466
|
-
/** A real, robust, material effect
|
|
1831
|
+
/** A real, robust, material effect — robust to the **observed** backdoor set + the
|
|
1832
|
+
* refuters that were run. It does NOT mean correctly-signed, free of reverse
|
|
1833
|
+
* causation, or free of unobserved confounding: read `refutation.robustness_value`
|
|
1834
|
+
* (E-value) and `refutation.expected_sign_ok` alongside it. */
|
|
1467
1835
|
readonly causal: NullType;
|
|
1468
1836
|
/** A small but real effect, or no clear effect after adjustment. */
|
|
1469
1837
|
readonly modest: NullType;
|
|
@@ -1547,6 +1915,12 @@ export declare const Causal: {
|
|
|
1547
1915
|
/** Average treatment effect on the controls */
|
|
1548
1916
|
readonly atc: NullType;
|
|
1549
1917
|
}>;
|
|
1918
|
+
readonly CausalSignType: VariantType<{
|
|
1919
|
+
/** The effect is expected to increase the outcome. */
|
|
1920
|
+
readonly positive: NullType;
|
|
1921
|
+
/** The effect is expected to decrease the outcome. */
|
|
1922
|
+
readonly negative: NullType;
|
|
1923
|
+
}>;
|
|
1550
1924
|
readonly CausalBootstrapConfigType: StructType<{
|
|
1551
1925
|
/** Number of bootstrap replicates (default 200) */
|
|
1552
1926
|
readonly reps: IntegerType;
|
|
@@ -1632,6 +2006,23 @@ export declare const Causal: {
|
|
|
1632
2006
|
}>>;
|
|
1633
2007
|
/** Random seed. */
|
|
1634
2008
|
readonly random_state: OptionType<IntegerType>;
|
|
2009
|
+
/** Graded-overlap threshold — common support below this keeps `causal` from the
|
|
2010
|
+
* top tier (verdict `modest`, `overlap.support_strength = thin`); default 0.55. */
|
|
2011
|
+
readonly strong_overlap: OptionType<FloatType>;
|
|
2012
|
+
/** Robustness floor — when set, a `causal` verdict whose E-value
|
|
2013
|
+
* (`refutation.robustness_value`, risk-ratio scale) is below this is downgraded to
|
|
2014
|
+
* `modest`. Off by default. The E-value is a monotone transform of the standardized
|
|
2015
|
+
* effect, so this acts as a stricter materiality bar, not an independent check. */
|
|
2016
|
+
readonly evalue_floor: OptionType<FloatType>;
|
|
2017
|
+
/** Directional prior — when set, a material, CI-clear effect of the opposite sign is
|
|
2018
|
+
* flagged (`refutation.expected_sign_ok = some(false)`, verdict `adjustment_insufficient`).
|
|
2019
|
+
* Off by default. Catches reverse causation / reactive assignment the refuters can't. */
|
|
2020
|
+
readonly expected_sign: OptionType<VariantType<{
|
|
2021
|
+
/** The effect is expected to increase the outcome. */
|
|
2022
|
+
readonly positive: NullType;
|
|
2023
|
+
/** The effect is expected to decrease the outcome. */
|
|
2024
|
+
readonly negative: NullType;
|
|
2025
|
+
}>>;
|
|
1635
2026
|
}>;
|
|
1636
2027
|
readonly BalanceRowType: StructType<{
|
|
1637
2028
|
readonly column: StringType;
|
|
@@ -1643,6 +2034,14 @@ export declare const Causal: {
|
|
|
1643
2034
|
/** Standardized mean difference, (mt-mc)/sqrt((vt+vc)/2). */
|
|
1644
2035
|
readonly std_diff: FloatType;
|
|
1645
2036
|
}>;
|
|
2037
|
+
readonly SupportStrengthType: VariantType<{
|
|
2038
|
+
/** Below `min_overlap` — no like-for-like comparison (engine refuses). */
|
|
2039
|
+
readonly refused: NullType;
|
|
2040
|
+
/** Clears the refuse gate but below `strong_overlap` — fragile support. */
|
|
2041
|
+
readonly thin: NullType;
|
|
2042
|
+
/** Common support ≥ `strong_overlap` — solid. */
|
|
2043
|
+
readonly strong: NullType;
|
|
2044
|
+
}>;
|
|
1646
2045
|
readonly OverlapDiagnosticType: StructType<{
|
|
1647
2046
|
/** Propensity histogram (20 bins over [0,1]) for the treated arm. */
|
|
1648
2047
|
readonly treated_propensity: VectorType<FloatType>;
|
|
@@ -1650,8 +2049,21 @@ export declare const Causal: {
|
|
|
1650
2049
|
readonly control_propensity: VectorType<FloatType>;
|
|
1651
2050
|
/** Fraction of rows inside the treated/control common support. */
|
|
1652
2051
|
readonly common_support_frac: FloatType;
|
|
1653
|
-
/** Whether common support clears `min_overlap
|
|
2052
|
+
/** Whether common support clears the **refuse** gate `min_overlap` — i.e. an
|
|
2053
|
+
* adjusted estimate is attempted at all. NOT a quality signal: `true` at the
|
|
2054
|
+
* default gate (0.10) still means barely-overlapping. Read `support_strength`
|
|
2055
|
+
* for the graded tier. */
|
|
1654
2056
|
readonly positivity_ok: BooleanType;
|
|
2057
|
+
/** Graded common-support tier (`refused` / `thin` / `strong` vs `strong_overlap`).
|
|
2058
|
+
* twin: e3-ui OverlapDiagnosticType.support_strength */
|
|
2059
|
+
readonly support_strength: VariantType<{
|
|
2060
|
+
/** Below `min_overlap` — no like-for-like comparison (engine refuses). */
|
|
2061
|
+
readonly refused: NullType;
|
|
2062
|
+
/** Clears the refuse gate but below `strong_overlap` — fragile support. */
|
|
2063
|
+
readonly thin: NullType;
|
|
2064
|
+
/** Common support ≥ `strong_overlap` — solid. */
|
|
2065
|
+
readonly strong: NullType;
|
|
2066
|
+
}>;
|
|
1655
2067
|
}>;
|
|
1656
2068
|
readonly RefutationType: StructType<{
|
|
1657
2069
|
/** Effect under a permuted (placebo) treatment — should be ≈ 0. */
|
|
@@ -1664,13 +2076,22 @@ export declare const Causal: {
|
|
|
1664
2076
|
readonly data_subset_effect: OptionType<FloatType>;
|
|
1665
2077
|
/** Std of the effect across data subsamples. */
|
|
1666
2078
|
readonly data_subset_std: OptionType<FloatType>;
|
|
1667
|
-
/** Closed-form E-value — confounder strength needed to
|
|
2079
|
+
/** Closed-form E-value (risk-ratio scale) — the confounder strength needed to
|
|
2080
|
+
* explain the effect away. A monotone transform of the standardized effect, so
|
|
2081
|
+
* it is NOT independent of the effect size; read it as "how easily overturned",
|
|
2082
|
+
* not as a separate confounding measure. */
|
|
1668
2083
|
readonly robustness_value: OptionType<FloatType>;
|
|
1669
2084
|
/** Unobserved-confounder sensitivity (tipping) curve: effect at each simulated strength. */
|
|
1670
2085
|
readonly sensitivity: OptionType<StructType<{
|
|
1671
2086
|
readonly strengths: VectorType<FloatType>;
|
|
1672
2087
|
readonly effects: VectorType<FloatType>;
|
|
1673
2088
|
}>>;
|
|
2089
|
+
/** Sign-prior check (when `config.expected_sign` is set): `some(true)` if a
|
|
2090
|
+
* material effect matches the expected direction, `some(false)` if it points the
|
|
2091
|
+
* other way (→ verdict `adjustment_insufficient`). `none` when no prior is given
|
|
2092
|
+
* or the effect is near-zero (its sign is undefined).
|
|
2093
|
+
* twin: e3-ui RefutationType.expected_sign_ok */
|
|
2094
|
+
readonly expected_sign_ok: OptionType<BooleanType>;
|
|
1674
2095
|
}>;
|
|
1675
2096
|
readonly DoseResponseType: StructType<{
|
|
1676
2097
|
readonly feature: StringType;
|
|
@@ -1682,7 +2103,10 @@ export declare const Causal: {
|
|
|
1682
2103
|
readonly size: VectorType<IntegerType>;
|
|
1683
2104
|
}>;
|
|
1684
2105
|
readonly ExperimentVerdictType: VariantType<{
|
|
1685
|
-
/** A real, robust, material effect
|
|
2106
|
+
/** A real, robust, material effect — robust to the **observed** backdoor set + the
|
|
2107
|
+
* refuters that were run. It does NOT mean correctly-signed, free of reverse
|
|
2108
|
+
* causation, or free of unobserved confounding: read `refutation.robustness_value`
|
|
2109
|
+
* (E-value) and `refutation.expected_sign_ok` alongside it. */
|
|
1686
2110
|
readonly causal: NullType;
|
|
1687
2111
|
/** A small but real effect, or no clear effect after adjustment. */
|
|
1688
2112
|
readonly modest: NullType;
|
|
@@ -1730,8 +2154,21 @@ export declare const Causal: {
|
|
|
1730
2154
|
readonly control_propensity: VectorType<FloatType>;
|
|
1731
2155
|
/** Fraction of rows inside the treated/control common support. */
|
|
1732
2156
|
readonly common_support_frac: FloatType;
|
|
1733
|
-
/** Whether common support clears `min_overlap
|
|
2157
|
+
/** Whether common support clears the **refuse** gate `min_overlap` — i.e. an
|
|
2158
|
+
* adjusted estimate is attempted at all. NOT a quality signal: `true` at the
|
|
2159
|
+
* default gate (0.10) still means barely-overlapping. Read `support_strength`
|
|
2160
|
+
* for the graded tier. */
|
|
1734
2161
|
readonly positivity_ok: BooleanType;
|
|
2162
|
+
/** Graded common-support tier (`refused` / `thin` / `strong` vs `strong_overlap`).
|
|
2163
|
+
* twin: e3-ui OverlapDiagnosticType.support_strength */
|
|
2164
|
+
readonly support_strength: VariantType<{
|
|
2165
|
+
/** Below `min_overlap` — no like-for-like comparison (engine refuses). */
|
|
2166
|
+
readonly refused: NullType;
|
|
2167
|
+
/** Clears the refuse gate but below `strong_overlap` — fragile support. */
|
|
2168
|
+
readonly thin: NullType;
|
|
2169
|
+
/** Common support ≥ `strong_overlap` — solid. */
|
|
2170
|
+
readonly strong: NullType;
|
|
2171
|
+
}>;
|
|
1735
2172
|
}>;
|
|
1736
2173
|
readonly refutation: OptionType<StructType<{
|
|
1737
2174
|
/** Effect under a permuted (placebo) treatment — should be ≈ 0. */
|
|
@@ -1744,13 +2181,22 @@ export declare const Causal: {
|
|
|
1744
2181
|
readonly data_subset_effect: OptionType<FloatType>;
|
|
1745
2182
|
/** Std of the effect across data subsamples. */
|
|
1746
2183
|
readonly data_subset_std: OptionType<FloatType>;
|
|
1747
|
-
/** Closed-form E-value — confounder strength needed to
|
|
2184
|
+
/** Closed-form E-value (risk-ratio scale) — the confounder strength needed to
|
|
2185
|
+
* explain the effect away. A monotone transform of the standardized effect, so
|
|
2186
|
+
* it is NOT independent of the effect size; read it as "how easily overturned",
|
|
2187
|
+
* not as a separate confounding measure. */
|
|
1748
2188
|
readonly robustness_value: OptionType<FloatType>;
|
|
1749
2189
|
/** Unobserved-confounder sensitivity (tipping) curve: effect at each simulated strength. */
|
|
1750
2190
|
readonly sensitivity: OptionType<StructType<{
|
|
1751
2191
|
readonly strengths: VectorType<FloatType>;
|
|
1752
2192
|
readonly effects: VectorType<FloatType>;
|
|
1753
2193
|
}>>;
|
|
2194
|
+
/** Sign-prior check (when `config.expected_sign` is set): `some(true)` if a
|
|
2195
|
+
* material effect matches the expected direction, `some(false)` if it points the
|
|
2196
|
+
* other way (→ verdict `adjustment_insufficient`). `none` when no prior is given
|
|
2197
|
+
* or the effect is near-zero (its sign is undefined).
|
|
2198
|
+
* twin: e3-ui RefutationType.expected_sign_ok */
|
|
2199
|
+
readonly expected_sign_ok: OptionType<BooleanType>;
|
|
1754
2200
|
}>>;
|
|
1755
2201
|
/** ALE dose-response of `dose_feature` (present when `config.dose_feature` is set). */
|
|
1756
2202
|
readonly dose_response: OptionType<StructType<{
|
|
@@ -1763,7 +2209,10 @@ export declare const Causal: {
|
|
|
1763
2209
|
readonly size: VectorType<IntegerType>;
|
|
1764
2210
|
}>>;
|
|
1765
2211
|
readonly verdict: VariantType<{
|
|
1766
|
-
/** A real, robust, material effect
|
|
2212
|
+
/** A real, robust, material effect — robust to the **observed** backdoor set + the
|
|
2213
|
+
* refuters that were run. It does NOT mean correctly-signed, free of reverse
|
|
2214
|
+
* causation, or free of unobserved confounding: read `refutation.robustness_value`
|
|
2215
|
+
* (E-value) and `refutation.expected_sign_ok` alongside it. */
|
|
1767
2216
|
readonly causal: NullType;
|
|
1768
2217
|
/** A small but real effect, or no clear effect after adjustment. */
|
|
1769
2218
|
readonly modest: NullType;
|
|
@@ -1801,7 +2250,10 @@ export declare const Causal: {
|
|
|
1801
2250
|
}>;
|
|
1802
2251
|
readonly ExperimentDesignType: StructType<{
|
|
1803
2252
|
readonly verdict: VariantType<{
|
|
1804
|
-
/** A real, robust, material effect
|
|
2253
|
+
/** A real, robust, material effect — robust to the **observed** backdoor set + the
|
|
2254
|
+
* refuters that were run. It does NOT mean correctly-signed, free of reverse
|
|
2255
|
+
* causation, or free of unobserved confounding: read `refutation.robustness_value`
|
|
2256
|
+
* (E-value) and `refutation.expected_sign_ok` alongside it. */
|
|
1805
2257
|
readonly causal: NullType;
|
|
1806
2258
|
/** A small but real effect, or no clear effect after adjustment. */
|
|
1807
2259
|
readonly modest: NullType;
|