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%

Code of Conduct

Please note that the vigicaen project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.

Copy Link

Version

Install

install.packages('vigicaen')

Monthly Downloads

418

Version

2.1.0

License

CeCILL-2.1

Issues

Pull Requests

Stars

Forks

Maintainer

Charles Dolladille

Last Published

September 14th, 2026

Functions in vigicaen (2.1.0)

dt_parquet

Read parquet and convert to data.table
create_example_tables

Example source tables for VigiBase and MedDRA
desc_cont

Summarise continuous variables
desc_facvar

Summarise categorical variables
demo_

Data of immune checkpoint inhibitors.
desc_rch

Rechallenge descriptive
desc_outcome

Outcome descriptive
desc_tto

Time to onset descriptive
desc_dch

Dechallenge descriptive
nice_p

Nice printing of p-values
ex_

Data for the immune checkpoint inhibitors example
get_llt_smq

Get low level term codes from SMQs
meddra_

Sample of MedDRA
vigi_routine

Display routine pharmacovigilance summary
vigicaen-deprecated

Deprecated functions in package vigicaen.
get_atc_code

Get ATC codes (DrecNos or MPIs)
tb_vigibase

Create VigiBase ECL tables
extract_tto

Time to onset extraction
vigicaen-package

vigicaen: 'VigiBase' Pharmacovigilance Database Toolbox
ic_tail

Credibility interval limits for the information component
tb_who

Create WHO tables
screen_drug

Screening of drugs
screen_adr

Screening of adverse drug reactions
tb_subset

Extract of subset of Vigibase
get_drecno

Get DrecNo from drug names or Record_Id
get_llt_soc

Get low level term codes from soc classification
mp_

Sample of WHODrug
tb_meddra

Create MedDRA tables
check_dm

Check binary variables
add_ind

Add indication column(s) to a dataset
compute_interaction

Compute interaction disproportionality
cff

Fast formatting of numbers
compute_dispro

Compute disproportionality
compute_or_mod

Compute (r)OR from a model summary
add_adr

Add adverse drug reaction column(s) to a dataset
add_dose

Add drug dose column(s) to a dataset, in milligram per day
add_outcomes

Add outcome columns to a dataset
add_drug

Add drug column(s) to a dataset