Description Usage Arguments Value See Also Examples
View source: R/convert2Tables.R
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
|
1 | convert2Tables(sr)
|
sr |
The output generated by the |
A data frame where each row represents a 2 x 2 table. The columns represent:
|
The ID of the drug |
|
The ID of the event |
|
The marginal probability of that drug |
|
The marginal probability of that event |
|
The increase of the odds ratio when the drug is on the report |
|
|
|
Number of times the drug and event appeared together in a report |
|
Number of times the event appeared without the drug in a report |
|
Number of times the drug appeared without the event in a report |
|
Number of times the drug and event both did not appear in a report |
1 2 | sr <- simulateSRS()
tables <- create2x2Tables(sr)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.