  Despite extensive safety assessments of drugs prior to their introduction to
the market, certain adverse drug reactions (ADRs) remain undetected. The
primary objective of pharmacovigilance is to identify these ADRs (i.e.,
signals). In addition to traditional spontaneous reporting systems (SRSs),
electronic health (EHC) data is being used for signal detection as well. Unlike
SRS, EHC data is longitudinal and thus requires assumptions about the patient's
drug exposure history and its impact on ADR occurrences over time, which many
current methods do implicitly.
  We propose an exposure model framework that explicitly models the
longitudinal relationship between the drug and the ADR. By considering multiple
such models simultaneously, we can detect signals that might be missed by other
approaches. The parameters of these models are estimated using maximum
likelihood, and the Bayesian Information Criterion (BIC) is employed to select
the most suitable model. Since BIC is connected to the posterior distribution,
it servers the dual purpose of identifying the best-fitting model and
determining the presence of a signal by evaluating the posterior probability of
the null model.
  We evaluate the effectiveness of this framework through a simulation study,
for which we develop an EHC data simulator. Additionally, we conduct a case
study applying our approach to four drug-ADR pairs using an EHC dataset
comprising over 1.2 million insured individuals. Both the method and the EHC
data simulator code are publicly accessible as part of the R package
https://github.com/bips-hb/expard.
