faers_ebgm
Compute empirical Bayes (EBGM/EB05) disproportionality scores for a drug's adverse events, shrinking observed-to-expected ratios toward 1 when evidence is limited.
Instructions
Empirical Bayes signal scores (EBGM with EB05/EB95) via the Gamma-Poisson Shrinker.
EBGM shrinks the observed-to-expected ratio toward 1 in proportion to how little evidence supports it. EB05 is the conventional screening statistic; EB05 > 2 is the usual threshold. The prior is fitted across a drug x event background table, so the FIRST call for a FAERS release builds and caches that table (~100 s, 3 + background_drugs calls). Call faers_warm_cache first, or raise the client timeout. Later calls take a few seconds.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| top_n | No | Events to score when `events` is omitted. | |
| events | No | Specific MedDRA PTs. Omit to score the drug's most-reported events. | |
| 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'. | |
| min_cases | No | Minimum observed count for a row. | |
| 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. | |
| stratify_by | No | Adjust expected counts for a confounder. Stratification enters MGPS only through E, so the prior is refitted. ~2 calls per stratum, cached. 'year' resolves its strata from the data and prunes negligible years. | |
| background_drugs | No | Substances in the background table the prior is fitted on. Building it costs 3 + this many calls, once per FAERS release, then it is cached. | |
| background_events | No | Terms in the background table. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||