View source: R/convert2Tables.R
convert2Tables | R Documentation |
Creates a data frame with all 2 x 2 contigency tables given a simulated data
set from simulateSRS
. The tables are organized
as follows:
event j | not event j | total | |
drug i | a | c | a + c |
not drug i | b | d | b + d |
total | a + b | c + d | n_reports
|
convert2Tables(sr)
sr |
The output generated by the |
A data frame where each row represents a 2 x 2 table. 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 increase of the odds ratio when the drug is on the report |
associated |
|
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 |
simulateSRS()
sr <- simulateSRS(verbose = FALSE)
tables <- convert2Tables(sr)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.