Refutations
Refutation checks probe the statistical assumptions underlying a fitted
estimator. Call result.refute(data) on any result object that supports it
to get a report back.
OLSRefutationReport
- class formative.OLSRefutationReport(checks, treatment, outcome)
Results of refutation checks run against an OLS estimation.
Obtain via
OLSResult.refute(data).Example:
result = OLSObservational( dag, treatment="education", outcome="income" ).fit(df) report = result.refute(df) print(report.summary())
- Parameters:
checks (
list[RefutationCheck])treatment (
str)outcome (
str)
IVRefutationReport
- class formative.IVRefutationReport(checks, treatment, outcome, instrument)
Results of refutation checks run against an IV (2SLS) estimation.
Obtain via
IVResult.refute(data). Each check is aRefutationCheckin.checks. The overall verdict is.passed.Example:
result = IV2SLS( dag, treatment="education", outcome="income", instrument="proximity" ).fit(df) report = result.refute(df) print(report.summary())
- Parameters:
checks (
list[RefutationCheck])treatment (
str)outcome (
str)instrument (
str)
MatchingRefutationReport
- class formative.MatchingRefutationReport(checks, treatment, outcome)
Results of refutation checks run against a propensity score matching estimation.
Obtain via
MatchingResult.refute(data). Each check is aRefutationCheckin.checks. The overall verdict is.passed.Example:
result = PropensityScoreMatching( dag, treatment="education", outcome="income" ).fit(df) report = result.refute(df) print(report.summary())
- Parameters:
checks (
list[RefutationCheck])treatment (
str)outcome (
str)
RCTRefutationReport
- class formative.RCTRefutationReport(checks, treatment, outcome)
Results of refutation checks run against an RCT estimation.
Obtain via
RCTResult.refute(data).Example:
result = RCT(dag, treatment="treatment", outcome="outcome").fit(df) report = result.refute(df) print(report.summary())
- Parameters:
checks (
list[RefutationCheck])treatment (
str)outcome (
str)
DiDRefutationReport
- class formative.DiDRefutationReport(checks, group, time, outcome)
Results of refutation checks run against a DiD estimation.
Obtain via
DiDResult.refute(data).Example:
result = DiD(dag, group="group", time="time", outcome="outcome").fit(df) report = result.refute(df) print(report.summary())
- Parameters:
checks (
list[RefutationCheck])group (
str)time (
str)outcome (
str)
RDDRefutationReport
- class formative.RDDRefutationReport(checks, treatment, running_var, cutoff, outcome)
Results of refutation checks run against an RDD estimation.
Obtain via
RDDResult.refute(data).Example:
result = RDD(dag, treatment="treatment", running_var="score", cutoff=0.0, outcome="outcome").fit(df) report = result.refute(df) print(report.summary())
- Parameters:
checks (
list[RefutationCheck])treatment (
str)running_var (
str)cutoff (
float)outcome (
str)
RefutationCheck
- class formative.RefutationCheck(name, passed, detail)
Result of a single refutation check.
- Parameters:
name (
str)passed (
bool)detail (
str)
Assumption
- class formative.Assumption(name, testable)
A single modelling assumption required for causal identification.
Every estimator exposes its assumptions via
result.assumptions, a list ofAssumptionobjects. Each assumption has a human-readable name and atestableflag indicating whether it can be empirically checked in the data or must be justified on substantive grounds.- Parameters:
name (
str)testable (
bool)
- name: str
Human-readable description of the assumption.
- testable: bool
Trueif the assumption can be empirically checked;Falseif it rests on domain knowledge.
- fmt_tag()
Return a fixed-width bracketed testability label for use in summary output.
- Return type:
str