Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ Collate:
'period.R'
'phv_.R'
'phv_ebgm.R'
'restrict.R'
'rxnorm.R'
'sample.R'
'scan-db.R'
Expand Down
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export(faers_phv_signal_composite)
export(faers_phv_table)
export(faers_primaryid)
export(faers_quarter)
export(faers_restrict)
export(faers_standardize)
export(faers_year)
export(fda_drugs)
Expand Down
19 changes: 19 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
# faers 1.5.6

* Added `faers_restrict()`, a report-level restriction helper that narrows a
standardized FAERS object to a sub-population by reporting period
(`.period`), date window (`.date_range` on `.date_field`, with partial
dates like year-only `1999` excluded and counted by default, or kept with
`.date_partial = "keep"`), sex, age interval (on the standardized
`age_in_years`), age group and occurrence country. All enabled conditions
are intersected; excluded reports (including missing or unparseable values)
are counted per condition and reported in a single aggregated warning. The
implementation converges onto `primaryid` and reuses `faers_keep()`, so
both the memory and duckdb backends work and the
`@standardization` / `@deduplication` flags are preserved.

* Added `.role_cod` to `faers_phv_scan()` and `faers_phv_scan_stratified()`:
restrict the exposure definition to specific drug role codes (`PS` primary
suspect, `SS` secondary suspect, `C` concomitant, `I` interacting) before
counting. `NULL` (default) keeps every role, matching previous behaviour;
the background `n` / `n_stratum` is unchanged either way. Implemented on
both backends (memory pre-filter and SQL `role_cod IN (...)` pushdown).

* Added `faers_phv_scan()`, a whole-database signal scanner that enumerates
all drug x event pairs, builds a contingency table for every pair and runs
the requested disproportionality methods in one vectorized pass. It ships
Expand Down
Loading
Loading