ror: Reporting Odds Ratio

Description Usage Arguments Details Value Methods (by class) References Examples

Description

Test on device-events using the reporting odds ratio (ROR). From the family of disproportionality analyses (DPA) used to generate signals of disproportionate reporting (SDRs).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
ror(df, ...)

## S3 method for class 'mds_ts'
ror(df, ts_event = c(Count = "nA"), analysis_of = NA, ...)

## Default S3 method:
ror(
  df,
  analysis_of = NA,
  eval_period = 1,
  null_ratio = 1,
  alpha = 0.05,
  cont_adj = 0,
  ...
)

Arguments

df

Required input data frame of class mds_ts or, for generic usage, any data frame with the following columns:

time

Unique times of class Date

nA

Cell A count (class numeric) of the 2x2 table: device/event of interest.

nB

Cell B count (class numeric) of the 2x2 table: device/non-event of interest.

nC

Cell C count (class numeric) of the 2x2 table: non-device/event of interest.

nD

Cell D count (class numeric) of the 2x2 table: non-device/non-event of interest.

...

Further arguments passed onto ror methods

ts_event

Required if df is of class mds_ts. Named string indicating the variable corresponding to the event count (cell A in the 2x2 contingency table). In most cases, the default is the appropriate setting. See details for alternative options.

Default: c("Count"="nA") corresponding to the event count column in mds_ts objects. Name is generated from mds_ts metadata.

analysis_of

Optional string indicating the English description of what was analyzed. If specified, this will override the name of the ts_event string parameter.

Default: NA indicates no English description for plain df data frames, or ts_event English description for df data frames of class mds_ts.

Example: "Count of bone cement leakages"

eval_period

Required positive integer indicating the number of unique times counting in reverse chronological order to sum over to create the 2x2 contingency table.

Default: 1 considers only the most recent time in df.

Example: 12 sums over the last 12 time periods to create the 2x2 contingency table.

null_ratio

Numeric ROR value representing the null hypothesis, used with alpha to establish the signal status and the p-value.

Default: 1 indicates a null hypothesis of ROR=1 and tests if the actual ROR is greater than 1.

alpha

Numeric value representing the statistical alpha used to establish the signal status.

Default: 0.05 corresponds to the standard alpha value of 5%.

cont_adj

Numeric value 0 or greater representing the continuity adjustment to be added to each cell of the 2x2 contingency table. A value greater than 0 allows for contingency tables with 0 cells to run the algorithm. A typical non-zero value is 0.5.

Default: 0 adds zero to each cell, thus an unadjusted table. If any cell of the 2x2 is 0, the algorithm will not run.

Details

For parameter ts_event, in the uncommon case where the device-event count (Cell A) variable is not "nA", the name of the variable may be specified here. Note that the remaining 3 cells of the 2x2 contingency table (Cells B, C, D) must be the variables "nB", "nC", and "nD" respectively in df. A named character vector may be used where the name is the English description of what was analyzed. Note that if the parameter analysis_of is specified, it will override this name. Example: ts_event=c("Count of Bone Cement Leakages"="event_count")

Value

A named list of class mdsstat_test object, as follows:

test_name

Name of the test run

analysis_of

English description of what was analyzed

status

Named boolean of whether the test was run. The name contains the run status.

result

A standardized list of test run results: statistic for the test statistic, lcl and ucl for the set confidence bounds, p for the p-value, signal status, and signal_threshold.

params

The test parameters

data

The data on which the test was run

Methods (by class)

References

Stricker BH, Tijssen JG. Serum sickness-like reactions to cefaclor. J Clin Epidemiol. 1992;45(10):1177-84.

Bohm R, Klein H.-J. (v2018-10-16). Primer on Disportionality Analysis. OpenVigil http://openvigil.sourcefourge.net/doc/DPA.pdf

Examples

1
2
3
4
5
6
7
8
9
# Basic Example
data <- data.frame(time=c(1:25),
                   nA=as.integer(stats::rnorm(25, 25, 5)),
                   nB=as.integer(stats::rnorm(25, 50, 5)),
                   nC=as.integer(stats::rnorm(25, 100, 25)),
                   nD=as.integer(stats::rnorm(25, 200, 25)))
a1 <- ror(data)
# Example using an mds_ts object
a2 <- ror(mds_ts[[3]])

mdsstat documentation built on March 13, 2020, 2:58 a.m.