faers_disproportionality
Compute ROR, PRR, and chi-square from a 2x2 contingency table for drug-adverse event pairs, with optional date windows, filters, and Mantel-Haenszel stratification.
Instructions
Build the 2x2 contingency table and compute ROR, PRR and chi-square.
Any date window or raw_filter is applied to all four marginals including the grand total N, so the table stays internally consistent. Screening criteria are reported individually by name rather than collapsed into a verdict.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| events | Yes | One or more MedDRA preferred terms. | |
| date_to | No | End of a receivedate window, YYYYMMDD. Must be paired with date_from. | |
| date_from | No | Start of a receivedate window, YYYYMMDD. Must be paired with date_to. | |
| drug_name | Yes | Active substance name, e.g. 'EMPAGLIFLOZIN'. | |
| raw_filter | No | Extra Lucene clause ANDed onto the preset query, e.g. 'patient.patientsex:2'. Applied to every marginal of a contingency table. See faers_describe_fields. | |
| role_basis | No | 'any' counts every report naming the drug in any role. 'suspect_verified' is only computable where records are in hand (faers_search_cases, faers_raw_search). | any |
| stratify_by | No | Adjust for a confounder by Mantel-Haenszel pooling. Reports crude and adjusted side by side with a Breslow-Day homogeneity test. Adds 4 calls per outer band. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||