Research paper mining logo

Causal Claim Referee

$1.50 USDC per call · Research integrity · POST /api/v1/prove-causality · Id causalReferee

Referees a causal claim against an observational table (JSON rows, CSV text, or a published contingency table with counts) and leads with a verdict, confidence, whether the claim holds, the crude and adjusted effects with bootstrap intervals, and a concrete next step. Underneath: crude and stratified effects, Mantel-Haenszel pooling, Simpson's-paradox detection, d-separation and backdoor/front-door checks with minimal adjustment sets, g-formula standardization with positivity checks, exact or seeded Monte Carlo permutation tests, and a PC-algorithm check of the DAG against the data. Verdict by code rules; with a caller-supplied DAG no model is called and the result is reproducible. Conclusions hold only under the DAG and no-unmeasured-confounding assumptions, which are listed in the output; this is statistical analysis, not a substitute for a randomized trial.

What you get

Tells a buyer whether a claimed cause-and-effect survives confounding, Simpson's reversals and unidentifiability, with reproducible numbers and a stated next step instead of an LLM opinion.

Call it

Send the JSON body below to https://agents.writerslogic.com/api/v1/prove-causality. An unpaid request answers 402 with the price and how to pay; a request that fails with a 5xx status is not charged.

curl -i -X POST https://agents.writerslogic.com/api/v1/prove-causality \
  -H 'content-type: application/json' \
  -d '{"data":[{"treatment":"A","stone_size":"small","success":1,"n":81},{"treatment":"A","stone_size":"small","success":0,"n":6},{"treatment":"A","stone_size":"large","success":1,"n":192},{"treatment":"A","stone_size":"large","success":0,"n":71},{"treatment":"B","stone_size":"small","success":1,"n":234},{"treatment":"B","stone_size":"small","success":0,"n":36},{"treatment":"B","stone_size":"large","success":1,"n":55},{"treatment":"B","stone_size":"large","success":0,"n":25}],"countColumn":"n","treatment":"treatment","outcome":"success","covariates":["stone_size"],"treatedValue":"B","claim":"Treatment B causes a higher recovery rate than treatment A.","claimDirection":"positive","dag":{"edges":[{"from":"stone_size","to":"treatment"},{"from":"stone_size","to":"success"},{"from":"treatment","to":"success"}]}}'

Input

FieldTypeRequiredDescription
dataarray<object>; max 20000 itemsnoObservational table as an array of row objects (at most 20000 rows). Cells are string, number, boolean or null; rows missing a used variable are dropped. Provide this or csv.
csvstring; length 10..3000000noAlternative to data: CSV text with a header line (comma, semicolon or tab separated; quoted fields allowed; at most 20000 data rows). Numeric cells become numbers.
countColumnstring; length 1..100noName of a column holding how many times each row repeats, so a published contingency table can be sent as a few aggregate rows (counts must be non-negative integers; the expanded table is capped at the row limit).
treatmentstring; length 1..100yesColumn with exactly two distinct values.
outcomestring; length 1..100yesBinary column (risk difference, risk ratio, odds ratio) or numeric column (mean difference).
covariatesarray<string; length 1..100>; max 12 itemsyesCandidate adjustment variables (at most 12). Numeric ones with more than `bins` distinct values are cut at deterministic quantile edges; others must have at most 20 levels.
claimstring; length 3..2000yesThe causal claim being refereed, in plain language.
dagobjectnoYour causal DAG (formal input: no LLM is called to build the graph or, by default, the report). Omit to have one proposed by two independent model samples, which is then an assumption.
treatedValueone ofnoTreatment value that counts as treated; required unless the values are numeric or boolean (then the larger is treated).
successValueone ofnoOutcome value that counts as success for a binary outcome; same default rule.
outcomeTypestring; one of "binary", "continuous"noForce the outcome type; inferred from the number of distinct values otherwise.
claimDirectionstring; one of "positive", "negative", "nonzero"noDirection of the claimed effect of treated vs control; default nonzero.
binsinteger; 2..10noQuantile bins for numeric covariates, default 4.
alphanumber; 0.001..0.2noSignificance level for the permutation test and the (1-alpha) bootstrap interval, default 0.05.
seedinteger; 0..4294967295noSeed for bootstrap and Monte Carlo; default derived from the input hash.
bootstrapRepsinteger; 100..2000no
permutationSamplesinteger; 1000..200000noUsed only when the exact enumeration would exceed 1000000 label assignments.
llmReportbooleannoAsk a model to write the executive report in prose (numbers verified in code, template fallback). Default false: the report is a deterministic template over the computed results.
descriptionsobjectnoOptional one-line description per variable, used only to propose the DAG.

Example request body

{
  "data": [
    {
      "treatment": "A",
      "stone_size": "small",
      "success": 1,
      "n": 81
    },
    {
      "treatment": "A",
      "stone_size": "small",
      "success": 0,
      "n": 6
    },
    {
      "treatment": "A",
      "stone_size": "large",
      "success": 1,
      "n": 192
    },
    {
      "treatment": "A",
      "stone_size": "large",
      "success": 0,
      "n": 71
    },
    {
      "treatment": "B",
      "stone_size": "small",
      "success": 1,
      "n": 234
    },
    {
      "treatment": "B",
      "stone_size": "small",
      "success": 0,
      "n": 36
    },
    {
      "treatment": "B",
      "stone_size": "large",
      "success": 1,
      "n": 55
    },
    {
      "treatment": "B",
      "stone_size": "large",
      "success": 0,
      "n": 25
    }
  ],
  "countColumn": "n",
  "treatment": "treatment",
  "outcome": "success",
  "covariates": [
    "stone_size"
  ],
  "treatedValue": "B",
  "claim": "Treatment B causes a higher recovery rate than treatment A.",
  "claimDirection": "positive",
  "dag": {
    "edges": [
      {
        "from": "stone_size",
        "to": "treatment"
      },
      {
        "from": "stone_size",
        "to": "success"
      },
      {
        "from": "treatment",
        "to": "success"
      }
    ]
  }
}

Result

The response is { "data": ..., "_provenance": ... }. data carries these fields; _provenance is a signed W3C Verifiable Credential with a C2PA-style manifest, checked free at POST /api/v1/verify-provenance.

FieldTypeRequiredDescription
headlineobjectnoVerdict-first digest computed in code: verdict, confidence, claimSupported (true, false or null when undecidable), crude and adjusted effect with bootstrap intervals, dagSource, a one-sentence summary and a concrete nextStep.
deterministicbooleannoTrue only for the formal-IR path (caller DAG): no model output can influence the verdict. False when the DAG came from a model or from the outage fallback.
statusstring; one of "OK", "BUDGET_EXCEEDED"no
verdictstring; one of "SUPPORTED_UNDER_ASSUMPTIONS", "CONFOUNDED", "SIMPSONS_REVERSAL", "NOT_IDENTIFIABLE", "INSUFFICIENT_DATA", "NOT_SUPPORTED"no
verdictRulestringno
confidencestring; one of "low", "medium", "high"no
reasonsarray<string>no
claimstringno
claimEvaluationobjectno
dataobjectno
dagobjectnoThe graph used, its source (caller, llm_proposed, default_all_confounders) and whether it is an assumption.
identificationobjectnoMinimal backdoor adjustment sets, front-door sets, and variables not to adjust for (mediators, colliders, post-treatment).
effectsobjectnoCrude and adjusted risk difference / risk ratio / odds ratio or mean difference with seeded bootstrap intervals.
testsobjectnoExact or Monte Carlo permutation p-values (within strata for the adjusted test), Fisher exact, Mantel-Haenszel test.
stratificationobjectno
simpsonobjectno
dagCheckobjectnoPC-algorithm skeleton and orientations from the data, and the conflicts with the assumed DAG.
caveatsarray<string>no
assumptionsarray<string>no
reportobjectnoExecutive report; source is llm only if every number in it appears in the computed results.
translationone ofno
auditobjectno

Pay and connect

Available through: x402 (USDC on Base), MCP, RapidAPI, Apify.

Machine-readable