Sensitivity and validation#

Use these objects after estimation. Diagnostics inspect fitted artifacts, sensitivity methods vary assumptions, and inference primitives construct derived uncertainty summaries.

Sensitivity#

cleverly.assessment.SensitivityFacade

Access sensitivity analyses supported by a fitted causal result.

cleverly.sensitivity.PositivityReport

Overlap diagnostics for a fitted TMLE.

cleverly.sensitivity.SensitivityBounds

Bias-adjusted bounds under an assumed confounder strength.

cleverly.sensitivity.SensitivityElements

The ingredients of the bias bound for one estimand.

cleverly.sensitivity.BenchmarkResult

Confounder strengths calibrated against covariates that were observed.

cleverly.sensitivity.ConfounderStrengthGrid

Declare treatment and outcome perturbation strengths.

cleverly.sensitivity.ObservedConfounderCalibration

Record one model-dependent observed-covariate calibration.

cleverly.sensitivity.SimulatedConfoundingCell

Store one strength pair's estimate or structured failure.

cleverly.sensitivity.SimulatedConfoundingResult

Store a qualitative simulated-confounding stress surface.

cleverly.sensitivity.EValue

E-values for a point estimate and the confidence limit nearest the null.

cleverly.sensitivity.positivity_report

Compute overlap diagnostics for a fitted TMLE.

cleverly.sensitivity.truncation_curve

Re-estimate across a grid of truncation bounds.

cleverly.sensitivity.omitted_variable_bounds

Bias-adjusted bounds and robustness values for one estimand.

cleverly.sensitivity.robustness_value

The confounding strength that would explain the effect away.

cleverly.sensitivity.benchmark

Calibrate cf_y and cf_d against observed covariates.

cleverly.sensitivity.evalue.evalue

E-value for a fitted result.

cleverly.sensitivity.missingness_tilt

Estimate under a range of departures from missingness-at-random.

cleverly.sensitivity.tipping_gamma

The tilt at which the conclusion tips.

cleverly.sensitivity.simulated_confounding

Refit a selected parameter across a simulated common-cause strength grid.

Validation#

cleverly.assessment.DiagnosticsFacade

Access diagnostics supported by a fitted causal result.

cleverly.validation.ScoreCheck

Whether the targeting step solved the score equations it was supposed to.

cleverly.validation.ScoreCheckRow

The score diagnostic for one estimand or one targeted family.

cleverly.validation.NuisanceDiagnostics

Fit quality for every nuisance model in a TMLE fit.

cleverly.validation.NuisanceModelReport

Fit quality for one nuisance model.

cleverly.validation.RepeatSpreadRow

Split sensitivity for one parameter in a repeated cross-fitted result.

cleverly.validation.GaussianNoise

Declare one Gaussian noise law for a generated outcome.

cleverly.validation.GaussianIndependentOutcome

Declare an outcome independent of treatment and adjustment variables.

cleverly.validation.GaussianAdjustmentOutcome

Declare f(W) + effect * A + epsilon with Gaussian noise.

cleverly.validation.RelativeGaussianNoise

Declare mean-zero numeric noise relative to a sampled variable.

cleverly.validation.BootstrapMeasurementError

Declare bootstrap measurement-error validation for adjustment variables.

cleverly.validation.EmpiricalInclusionRule

Declare a two-sided empirical inclusion rule for generated outcomes.

cleverly.validation.EmpiricalRefitRecord

One successful empirical refit.

cleverly.validation.RefutationTest

The outcome of one refutation test.

cleverly.validation.RefutationResult

All refutation tests run on a fit.

cleverly.validation.CoverageStudy

Repeatedly fit an estimator on fresh data and measure bias and coverage.

cleverly.validation.StudyResult

The full output of a CoverageStudy.

cleverly.validation.ReplicationRecord

One estimand from one successful repeated-sampling draw.

cleverly.validation.ReplicationFailure

A replication whose fit failed numerically, kept so the study can be diagnosed.

cleverly.validation.ReplicationCheckpoint

Storage that lets an interrupted CoverageStudy resume.

cleverly.validation.DirectoryCheckpoint

Keep each finished replication of a CoverageStudy as a file in a directory.

cleverly.validation.score_check

Check that targeting solved the score equation.

cleverly.validation.nuisance_diagnostics

Fit diagnostics for every nuisance model in the fit.

cleverly.validation.refute

Run refutation tests against a fitted model.

Inference primitives#

cleverly.inference.BootstrapResult

Bootstrap draws for every estimand, plus how many replicates failed.

cleverly.inference.SimultaneousBands

Joint confidence bands across several estimands.

cleverly.inference.delta_method

Influence curve of function applied to several estimands.

cleverly.inference.influence_covariance

Covariance matrix across several estimands' influence curves.

cleverly.inference.influence_variance

Variance of an estimator from its influence curve.

cleverly.inference.multiplier_critical_value

The 1 - alpha quantile of the max-t statistic.

cleverly.inference.simultaneous_bands

Joint confidence bands over a set of estimates.

cleverly.inference.run_bootstrap

Run n_replicates full-refit bootstrap replicates.