AssessLite: test what your analysis depends on — structural assumption assessment for causal analysis
Project description
AssessLite (Python)
Test what your analysis depends on.
Structural assumption assessment for causal analysis — the native Python interface to
the AssessLite core specification v0.1. The R package (assesslite on r-universe) implements
the same spec; audit records written by either conform to the same JSON Schema.
Every causal result borrows strength across units, places, or times, licensed by invariance assumptions usually left implicit inside exchangeability or i.i.d. sampling. AssessLite makes them explicit, attacks them, and records what survived — with three-way verdicts (stable / unstable / not resolvable at this n), because every stability gate is a bright line on a noisy estimate.
Install
pip install assesslite
Pure numpy + pandas; the Cox (Breslow partial likelihood) and GLM (IRLS) estimators are
implemented in-package, so there is no heavy or version-fragile stats dependency.
Use
from assesslite import StructuralAudit
assessment = StructuralAudit(
data=lung_registry, # pandas DataFrame
outcome=("time", "status"), # Cox; or "y" for a GLM
exposure="adherence",
covariates=["age", "sex", "stage"],
cluster="hospital",
time="diagnosis_year",
subgroups=["stage"],
unit="patient",
)
assessment.assume(
"cluster_exchangeability",
rationale="hospitals follow the same national guideline; assumed provisionally",
licenses="one pooled effect across hospitals; transport to a hospital outside the sample",
)
assessment.test(
["unit_permutation", "cluster_holdout", "temporal_split", "subgroup_stability"]
).decide(abstain_if={"estimate_sign_changes": True})
print(assessment)
audit = assessment.export_audit("audit.json") # durable audit record (also returned as a dict)
assessment.render_report("report.html") # self-contained HTML report
Product, process, output
- AssessLite is the product.
- an assessment — a
StructuralAudit— is the process: open it, declare its ledger, attack it, decide. - an audit record is the durable output:
export_audit()returns it as a dict and writes it as schema-conforming JSON.
Estimators
("time", "status")→ Cox proportional hazards (Breslow ties), log hazard ratio.- binary 0/1 outcome → logistic GLM, log odds ratio.
- continuous outcome → linear GLM, linear coefficient.
The Cox implementation reproduces R's coxph(ties="breslow") coefficients and standard errors
exactly.
See examples/worked_example.py for a complete run on simulated multicentre data.
Apache License 2.0.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file assesslite-0.3.0.tar.gz.
File metadata
- Download URL: assesslite-0.3.0.tar.gz
- Upload date:
- Size: 35.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c9cdf55a61530a174cce46e25282a28ce203ca4085b409f6a99c16235765e921
|
|
| MD5 |
7b0ff16d79cda2b66d2a359f5594242b
|
|
| BLAKE2b-256 |
1bea7ffe6db8fe36b38418e26a71d16ae35874633fb2875bda80efdb955d5f2a
|
Provenance
The following attestation bundles were made for assesslite-0.3.0.tar.gz:
Publisher:
publish.yml on heidihelena/assesslite
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
assesslite-0.3.0.tar.gz -
Subject digest:
c9cdf55a61530a174cce46e25282a28ce203ca4085b409f6a99c16235765e921 - Sigstore transparency entry: 2145548032
- Sigstore integration time:
-
Permalink:
heidihelena/assesslite@4daea6bbf90abbef803ca9be42b7aab846032e3c -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/heidihelena
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@4daea6bbf90abbef803ca9be42b7aab846032e3c -
Trigger Event:
release
-
Statement type:
File details
Details for the file assesslite-0.3.0-py3-none-any.whl.
File metadata
- Download URL: assesslite-0.3.0-py3-none-any.whl
- Upload date:
- Size: 37.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4f313cc6d66644228d92d81c00bb063396350cab40281fce075fce04213f10b0
|
|
| MD5 |
bdb01c6349ae4c51ad749a7d32373827
|
|
| BLAKE2b-256 |
e5dd1623aafeeab88c211bee2adb3b0da83481a7ed70878707e2027a8cd1c249
|
Provenance
The following attestation bundles were made for assesslite-0.3.0-py3-none-any.whl:
Publisher:
publish.yml on heidihelena/assesslite
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
assesslite-0.3.0-py3-none-any.whl -
Subject digest:
4f313cc6d66644228d92d81c00bb063396350cab40281fce075fce04213f10b0 - Sigstore transparency entry: 2145548166
- Sigstore integration time:
-
Permalink:
heidihelena/assesslite@4daea6bbf90abbef803ca9be42b7aab846032e3c -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/heidihelena
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@4daea6bbf90abbef803ca9be42b7aab846032e3c -
Trigger Event:
release
-
Statement type: