chi2Test: Chi-squared Test

Description Usage Arguments Value Note

View source: R/chi2Test.R

Description

Performs the chi-squared test with or without Yates's continuity correction to a collection of 2 x 2 tables of the form

event not event
drug a c
not drug b d

Usage

1
chi2Test(a, b, c, d, yates = FALSE)

Arguments

a

A vector with the counts of the upper left corner of the tables

b

A vector with the counts of the lower left corner of the tables

c

A vector with the counts of the upper right corner of the tables

d

A vector with the counts of the lower right corner of the tables

yates

If TRUE, Yates's correction is used

Value

p-value

Note

The standard warnings for when the counts are too low in the 2 x 2 tables are suppressed. Due to the sparse nature of spontaneous reporting data, this happens quite frequently.


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