Learn R Programming

vigicaen

Visit the package website

The goal of vigicaen is to provide tools to analyze VigiBase Extract Case Level.

VigiBase is the World Health Organization’s (WHO) global pharmacovigilance database of individual case safety reports. It is maintained by the Uppsala Monitoring Centre in Sweden.

This package is NOT supported nor reflects the opinion of the WHO, or the Uppsala Monitoring Centre.

Prerequisites

Users are assumed to be familiar with pharmacovigilance analysis principles. Some useful resources can be found here (English) or here (French).

vigicaen is an R package, so you need to have R installed on your computer, and optionally RStudio.

Use of VigiBase Extract Case Level and the subsequent WHODrug data requires a license from the Uppsala Monitoring Centre.

Use of MedDRA requires a license from MedDRA.

Of note, academic researchers are provided with accommodations for these licenses.

Technical requisites

Vigibase ECL tables are very large, your computer must meet the following requirements:

  • Free disk space of at least 50GB

  • At least 16GB of RAM

  • A not too old processor (partial tests conducted on 2019 Intel 7, and more recent 2023 AMD Ryzen 3)

Target users

There are 2 types of users this package is aimed at:

  • Routine pharmacovigilance practitioners. These users may not be very familiar with R, or statistics in general. They would like to collect additional data, when writing pharmacovigilance reports, or working on a reported case (information component, reaction time to onset). These users will be interested in the “Routine pharmacovigilance” vignette, vignette("routine_pharmacovigilance").

  • Advanced pharmacovigilance researchers. These users must be familiar with R and (a bit of) statistics. The will find tools to load tables, perform usual data management, identify drug and reaction IDs, describe complexe features (dechallenge, rechallenge), perform disproportionality, and get ready-to-use datasets to apply any regression or machine learning algorithm.

Installation

Solution 1

From CRAN

install.packages("vigicaen")

Development version from GitHub

devtools::install_github("pharmacologie-caen/vigicaen")

Solution 2

Find the latest Released version here

Download source code as a tar.gz file.

If you use RStudio, click on “Tools”, “Install Packages…”, select “Package Archive file” and locate the tar.gz file on your computer.

Alternatively, you can use the following command in R:

install.packages("path/to/vigicaen_X.XX.X.tar.gz", repos = NULL, type = "source")

Cheatsheet

How to use

Visit the package website

Good places to start your journey:

  • Set the stage with vignette("getting_started")

  • Explore vigibase vignette("routine_pharmacovigilance")

  • Dive into advanced features vignette("basic_workflow")

Example

You are working on a colitis case reported 80 days after ipilimumab initiation.

You would like to know the information component (possibly restricted to a specific population, e.g. older adults), and the time to onset reported for this reaction.

library(vigicaen)

# Step 1: Load datasets (or use example sets
# as shown below)

demo   <- demo_
adr    <- adr_
drug   <- drug_
link   <- link_
mp     <- mp_
meddra <- meddra_

# Step 2: Pick a drug and a reaction

d_code <- 
  list(
    ipilimumab = "ipilimumab"
  ) |> 
  get_drecno(mp = mp)

a_code <-
  list(
    colitis = "Colitis (excl infective)"
  ) |> 
  get_llt_soc(term_level = "hlt", meddra = meddra)

# Step 3: Plot results

vigi_routine(
  case_tto  = 80, # your case
  demo_data = demo,
  drug_data = drug,
  adr_data  = adr,
  link_data = link,
  d_code    = d_code,
  a_code    = a_code,
  vigibase_version = "September 2024"
)

Example

You want to perform a disproportionality analysis between nivolumab exposure and colitis reporting (reporting odds-ratio or and information component ic).

library(vigicaen)

demo <-
  demo_ |> 
  add_drug(
    d_code = ex_$d_drecno,
    drug_data = drug_
  ) |> 
  add_adr(
    a_code = ex_$a_llt,
    adr_data = adr_
  )

demo |> 
  compute_dispro(
    y = "a_colitis",
    x = "nivolumab"
  )
#> # A tibble: 1 × 9
#>   y         x         n_obs n_exp or    or_ci          ic ic_tail ci_level
#>   <chr>     <chr>     <dbl> <dbl> <chr> <chr>       <dbl>   <dbl> <chr>   
#> 1 a_colitis nivolumab    44  31.2 1.88  (1.23-2.88) 0.489  0.0314 95%

Copy Link

Version

Install

install.packages('vigicaen')

Monthly Downloads

309

Version

0.15.6

License

CeCILL-2.1

Issues

Pull Requests

Stars

Forks

Maintainer

Charles Dolladille

Last Published

March 13th, 2025

Functions in vigicaen (0.15.6)

demo_

Data of immune checkpoint inhibitors.
desc_cont

Summarize continuous variables
desc_dch

Dechallenge descriptive
desc_facvar

Summarise categorical variables
dt_parquet

Read parquet and convert to data.table
dt_fst

Read fst and convert to data.table
extract_tto

Time to onset extraction
add_drug

Add DRUG column(s) to a dataset (tidyverse syntax)
desc_tto

Time to onset descriptive
ex_

Data for the immune checkpoint inhibitors example
get_atc_code

Get ATC codes (DrecNos or MPIs)
mp_

Sample of WHODrug
get_drecno

Get DrecNo from drug names or MedicinalProd_Id
meddra_

Sample of Meddra.
compute_dispro

Compute disproportionality
compute_interaction

Compute interaction disproportionality
nice_p

Nice printing of p-values
get_llt_smq

Extract low level terms from SMQs
screen_adr

Screening of Adverse Drug Reactions
screen_drug

Screening of Drugs
tb_subset

Extract of subset of Vigibase
tb_meddra

Create MedDRA tables
desc_outcome

Outcome descriptive
desc_rch

Rechallenge descriptive
tb_who

Create main WHO tables
get_llt_soc

Extract low level terms from soc classification
ic_tail

Credibility interval limits for the information component
tb_vigibase

Create main VigiBase ECL tables
vigi_routine

Pharmacovigilance routine function
vigicaen-package

vigicaen: 'VigiBase' Pharmacovigilance Database Toolbox
vigicaen-deprecated

Deprecated functions in package vigicaen.
compute_or_mod

Compute (r)OR from a model summary
create_example_tables

Example source tables for VigiBase and MedDRA
check_dm

Check binary variables
add_adr

Add ADR column(s) to a dataset
cff

Fast formatting of numbers