Skip to main content

Documentation Index

Fetch the complete documentation index at: https://wuweism.com/llms.txt

Use this file to discover all available pages before exploring further.

Before running a causal analysis, use this endpoint to check whether the effect of an intervention on an outcome is identifiable — that is, whether it can be estimated from observational data given your adjustment strategy. The endpoint checks your adjustment set against the SCM’s causal graph and reports whether the back-door (or other) criterion is satisfied.

Validate an intervention

POST /api/scm/intervention/validate
This endpoint requires authentication. Include your session token in the Authorization header.

Request body

treatment
string
required
The variable you intend to intervene on (the “do” variable in Pearl’s do-calculus). Must be a node in the target SCM.
outcome
string
required
The outcome variable whose causal response you want to estimate.
adjustmentSet
string[]
Variables you plan to control for (condition on) in your analysis. The endpoint checks whether this set is sufficient to block all back-door paths from treatment to outcome.
knownConfounders
string[]
Confounders you have identified from domain knowledge. Used alongside the SCM structure to assess completeness of your adjustment set.
modelKey
string
The SCM to validate against. If omitted, Wu-Weism selects the most relevant registered model based on the variable names you provide. See SCM model registry for available model keys.

Response fields

allowed
boolean
required
true if the intervention is identifiable with the provided adjustment set. false if the effect cannot be estimated without additional variables or structural assumptions.
allowedOutputClass
string
required
The output class permitted by the identifiability analysis. One of:
  • interventional — the effect of the do-intervention P(Y | do(X)) is estimable.
  • observational — only observational associations P(Y | X) are estimable; intervention is not identified.
  • blocked — the intervention violates structural constraints in the SCM and cannot proceed.
rationale
string
required
Human-readable explanation of the identifiability decision.
identifiability
object
required
Detailed identifiability analysis.

Example

curl --request POST \
  --url https://wuweism.com/api/scm/intervention/validate \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "treatment": "cortisol_level",
    "outcome": "hippocampal_volume",
    "knownConfounders": ["stress_exposure", "age"],
    "adjustmentSet": ["stress_exposure"],
    "modelKey": "neural_topology_v1"
  }'
{
  "allowed": true,
  "allowedOutputClass": "interventional",
  "rationale": "Sufficient adjustment set identified.",
  "identifiability": {
    "identifiable": true,
    "requiredConfounders": ["stress_exposure"],
    "adjustmentSet": ["stress_exposure"],
    "missingConfounders": [],
    "note": "Back-door criterion satisfied."
  }
}
A response of "allowed": false does not mean the causal effect does not exist — it means the effect cannot be estimated from observational data with your current adjustment strategy. You may need to collect additional data, add variables to your adjustment set, or apply an alternative identification strategy (front-door criterion, instrumental variables, etc.).