riskratio.estimation {epitools}R Documentation

Risk ratio estimation and with Fisher's exact test

Description

Estimates risk ratio using different methods and performs Fisher's exact test for testing the null of independence of rows and columns in a contingency table with fixed marginals.

Usage

riskratio.crude(...)
riskratio.ss(...)

Arguments

... A 2x2 table or equivalent. See as.epitable for details.

Details

These functions calculate the risk ratio using different methods and performs Fisher's exact test for testing the null of independence of rows and columns in a contingency table with fixed marginals. These functions calculate the risk ratio for the following type of 2x2 contingency table (opposite of how data is displayed in epidemiology textbooks, but consistent with how data is handled in statistical programs):

                Outcome
   Exposure     No  Yes
     No (ref)    a    b
     Yes         c    d

The riskratio.crude function calculates the risk ratio using d/(c + d))/(b/(a + b).

The riskratio.ss function calculates the risk ratio using a small sample (ss) adjustment (Jewell 2004): d/(c + d))/((b + 1)/(a + b + 1).

Value

$data original data
$risks proportion exposed for each outcome category
$estimate odds ratio
$fishers.exact p value

Note

Visit http://www.epitools.net for the latest.

Author(s)

Tomas Aragon, aragon@berkeley.edu, http://www.medepi.net/aragon

References

Nicholas P. Jewell (2004), Statistics for Epidemiology, Chapman & Hall, 1st Edition

See Also

See also oddsratio.estimation, as.epitable, epitab

Examples

##From Jewell (2004), p. 79
riskratio.crude(88, 20, 555, 347)
riskratio.ss(88, 20, 555, 347)

dat <- matrix(c(88, 20, 555, 347), 2, 2, byrow = TRUE)
dimnames(dat) <- list (c("0", ">=1"), c("Controls", "Cases"))
names(dimnames(dat)) <- c("Coffee (cups/day)", "Pancreatic Cancer")
dat
riskratio.crude(dat)
riskratio.ss(dat)


[Package Contents]