srdata: A Simulated Spontaneous Reporting System

Description Usage Format

Description

A simulated spontaneous reporting data set generated with the SRSim simulator. The data set contains 10,000 reports for 10 drugs and 10 adverse events (AEs). Five drug-AE pairs are associated with an odds ratio of 2. All other drug-AE pairs have an odds ratio of 1. Five drugs are innocent bystanders, i.e., they are prescribed together with one other drug, but they do not cause any adverse events.

The marginal probabilities over the drugs and the AEs were drawn from a Beta distribution with parameters α = 1.0 and β = 20.0.

The conditional probability of an innocent bystander given that the other drug is prescribed is set to .9 (this is regulated with the argument bystander_prob).

The following commands were used for generating the data set:

library(SRSim)
srdata <- SRSim::simulateSRS(n_reports = 10000, n_drugs = 10, n_events = 10, n_innocent_bystanders = 5, bystander_prob = 0.9, n_correlated_pairs = 5, theta = 2, seed = 1)
# create the 2x2 tables
srdata$tables <- SRSim::convert2Tables(srdata)

Usage

1

Format

srdata contains the following elements:

sr

A binary data frame with 10,000 rows and 20 columns. The first 10 columns represent the drugs; the latter represent the events. Each row is a report. In case of a 1, the drug/event has been reported, zero otherwise. The column names are drug1 till drug10 and event1 till event10.

dag

The directed acycled graph as an igraph object

nodes

A tibble with all the information on each node/variate:

  • label The label for each node/variate

  • in_degree The number of edges pointing to the node

  • id The ID of each node (simple integer)

  • parent_id The ID of the parent node - if any. Otherwise equal to -1

  • margprob The marginal probability of the node/variate

  • beta0 The intercept in the logistic regression model for that node

  • beta1 The regression coefficient in the logistic regression model for the parent

prob_drugs

A vector with marginal probabilities of the drugs

prob_events

A vector with marginal probabilities of the events

tables

A data frame with 100 rows. Each row contains the data on a drug-event pair. The columns represent:

drug_id

The ID of the drug

event_id

The ID of the event

prob_drug

The marginal probability of that drug

prob_event

The marginal probability of that event

or

The odds ratio

associated

TRUE is there is a non-zero correlation, FALSE otherwise

a

Number of times the drug and event appeared together in a report

b

Number of times the event appeared without the drug in a report

c

Number of times the drug appeared without the event in a report

d

Number of times the drug and event both did not appear in a report


bips-hb/pvm documentation built on Dec. 14, 2020, 9:31 a.m.