| srdata | R Documentation |
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.
srdata
srdata contains the following elements:
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.
The directed acycled graph as an igraph object
A tibble with all the information on each node/variate:
labelThe label for each node/variate
in_degreeThe number of edges pointing to the node
idThe ID of each node (simple integer)
parent_id The ID of the parent node - if any. Otherwise equal to -1
margprobThe marginal probability of the node/variate
beta0The intercept in the logistic regression model for that node
beta1The regression coefficient in the logistic regression model for the parent
A vector with marginal probabilities of the drugs
A vector with marginal probabilities of the events
A data frame with 100 rows. Each row contains the data on a drug-event pair. The columns represent:
drug_idThe ID of the drug
event_idThe ID of the event
prob_drugThe marginal probability of that drug
prob_eventThe marginal probability of that event
orThe odds ratio
associatedTRUE is there is a non-zero correlation, FALSE otherwise
aNumber of times the drug and event appeared together in a report
bNumber of times the event appeared without the drug in a report
cNumber of times the drug appeared without the event in a report
dNumber of times the drug and event both did not appear in a report
The marginal probabilities over the drugs and the AEs were drawn
from a Beta distribution with parameters \alpha = 1.0 and
\beta = 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)
```
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.