Learn R Programming

emcAdr (version 1.3)

compute_hypergeom_cocktail: Function used to compute the Hypergeometric score on a cocktail

Description

Function used to compute the Hypergeometric score on a cocktail

Usage

compute_hypergeom_cocktail(
  cocktail,
  upperBounds,
  ADRCount,
  observationsADR,
  observationsMedication,
  num_thread = 1L
)

Value

Hypergeometric score of the "cocktail" parameter

Arguments

cocktail

: A cocktail in the form of vector of integers (ATC index)

upperBounds

: ATC tree upper bound of the DFS (without the root)

ADRCount

: number of patient experiencing ADR in dataset

observationsADR

: observation of the ADR for each patients (a vector containing the ADR on which we want to compute the risk distribution)

observationsMedication

: observation of the drug intake for each patients on which we want to compute the risk distribution

num_thread

: Number of thread to run in parallel if openMP is available, 1 by default

Examples

Run this code
# \donttest{
data("ATC_Tree_UpperBound_2024")
data("FAERS_myopathy")

ADRCount = sum(FAERS_myopathy$patientADR)
cocktail = c(561, 904)

Hypergeom_of_cocktail = compute_hypergeom_cocktail(cocktail = cocktail,
                              upperBounds = ATC_Tree_UpperBound_2024$upperBound,
                              ADRCount =  ADRCount,
                              observationsADR = FAERS_myopathy$patientADR,
                              observationsMedication = FAERS_myopathy$patientATC,
                              num_thread=8)
# }

Run the code above in your browser using DataLab