screen_adr | R Documentation |
Identify and rank the
most frequently reported adverse drug reaction (ADR) terms
in a dataset, based on a specified MedDRA term level.
It allows users to filter terms by a frequency
threshold or extract the top
n
most frequently occurring terms.
.data |
An |
meddra |
A |
term_level |
A character string specifying the
MedDRA hierarchy level. Must be one
of |
freq_threshold |
A numeric value indicating
the minimum frequency (as a proportion) of cases
where a term must appear to be included in the results.
For example, |
top_n |
An integer specifying the number of most
frequently occurring terms to return.
Defaults to |
If freq_threshold
is set (e.g., 0.05
), the function
filters ADR terms appearing in at least 5% of unique reports in .data
.
If top_n
is specified, only the most frequent n
terms
are returned. If both freq_threshold
and top_n
are provided,
only top_n
is applied (a warning is issued in such cases).
Counts are computed at the case level, not the ADR level. This means frequencies reflect the proportion of unique reports (cases) where a term is mentioned, rather than the total mentions across all reports.
The function processes an ADR dataset (adr_
) and
a MedDRA dataset (meddra_
) to generate results
that are linked to a specific MedDRA hierarchy
level (soc
, hlgt
, hlt
, pt
, or llt
).
A data.frame
with the following columns:
term: The MedDRA term at the specified hierarchy level.
n: The number of unique reports (cases) where the term appears.
percentage: The percentage of total unique reports where the term appears.
The results are sorted in descending order of percentage
.
# Example 1: Filter terms appearing in at least 5% of reports
screen_adr(
.data = adr_,
meddra = meddra_,
term_level = "pt",
freq_threshold = 0.05
)
# Example 2: Get the top 5 most frequent terms
screen_adr(
.data = adr_,
meddra = meddra_,
term_level = "hlt",
top_n = 5
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.