Title: | Approximate Unconditional and Permutation Tests |
---|---|
Description: | Performs approximate unconditional and permutation testing for 2x2 contingency tables. Motivated by testing for disease association with rare genetic variants in case-control studies. When variants are extremely rare, these tests give better control of Type I error than standard tests. |
Authors: | Arjun Sondhi, Ken Rice |
Maintainer: | Arjun Sondhi <[email protected]> |
License: | GPL-2 |
Version: | 0.99 |
Built: | 2024-10-31 06:50:36 UTC |
Source: | CRAN |
Calculates approximate unconditional Firth test p-value for testing independence in 2x2 case-control tables. The Firth test requires significantly more computational time than the tests computed in the au.tests function.
au.firth(m0, m1, r0, r1, lowthresh = 1e-12)
au.firth(m0, m1, r0, r1, lowthresh = 1e-12)
m0 |
Number of control subjects |
m1 |
Number of case subjects |
r0 |
Number of control subjects exposed |
r1 |
Number of case subjects exposed |
lowthresh |
A threshold for probabilities below to be considered as zero. Defaults to 1e-12. |
A single AU p-value, computed under the Firth test.
au.firth(15000, 5000, 1, 0)
au.firth(15000, 5000, 1, 0)
Calculates AU p-values for testing independence in 2x2 case-control tables, while adjusting for categorical covariates. Inputs are given as a vector of counts in each strata defined by the covariate(s). Note that computational time can be extremely high.
au.test.strat(m0list, m1list, r0list, r1list, lowthresh = 1e-12)
au.test.strat(m0list, m1list, r0list, r1list, lowthresh = 1e-12)
m0list |
Number of control subjects in each strata |
m1list |
Number of case subjects in each strata |
r0list |
Number of control subjects exposed in each strata |
r1list |
Number of case subjects exposed in each strata |
lowthresh |
A threshold for probabilities below to be considered as zero. Defaults to 1e-12. |
An AU p-value, computed under the likelihood ratio test.
au.test.strat(c(500, 1250), c(150, 100), c(0, 0), c(10, 5))
au.test.strat(c(500, 1250), c(150, 100), c(0, 0), c(10, 5))
Calculates approximate unconditional p-values for testing independence in 2x2 case-control tables.
au.tests(m0, m1, r0, r1, lowthresh = 1e-12)
au.tests(m0, m1, r0, r1, lowthresh = 1e-12)
m0 |
Number of control subjects |
m1 |
Number of case subjects |
r0 |
Number of control subjects exposed |
r1 |
Number of case subjects exposed |
lowthresh |
A threshold for probabilities below to be considered as zero. Defaults to 1e-12. |
A vector of AU p-values, computed under score, likelihood ratio, and Wald tests.
au.tests(15000, 5000, 30, 25) au.tests(10000, 10000, 30, 25)
au.tests(15000, 5000, 30, 25) au.tests(10000, 10000, 30, 25)
Calculates standard p-values for testing independence in 2x2 case-control tables.
basic.tests(m0, m1, r0, r1)
basic.tests(m0, m1, r0, r1)
m0 |
Number of control subjects |
m1 |
Number of case subjects |
r0 |
Number of control subjects exposed |
r1 |
Number of case subjects exposed |
A vector of p-values, computed under score, likelihood ratio, Wald, Firth, and Fisher's exact tests.
basic.tests(15000, 5000, 30, 25)
basic.tests(15000, 5000, 30, 25)
Calculates permutation p-values for testing independence in 2x2 case-control tables, while adjusting for categorical covariates. Inputs are given as a vector of counts in each strata defined by the covariate(s). Note that computational time can be extremely high.
perm.test.strat(m0list, m1list, r0list, r1list)
perm.test.strat(m0list, m1list, r0list, r1list)
m0list |
Number of control subjects in each strata |
m1list |
Number of case subjects in each strata |
r0list |
Number of control subjects exposed in each strata |
r1list |
Number of case subjects exposed in each strata |
A permutation p-value, computed under the likelihood ratio test.
perm.test.strat(c(7000, 1000), c(11000, 1000), c(50, 30), c(70, 40))
perm.test.strat(c(7000, 1000), c(11000, 1000), c(50, 30), c(70, 40))
Calculates permutation p-values for testing independence in 2x2 case-control tables.
perm.tests(m0, m1, r0, r1, lowthresh = 1e-12)
perm.tests(m0, m1, r0, r1, lowthresh = 1e-12)
m0 |
Number of control subjects |
m1 |
Number of case subjects |
r0 |
Number of control subjects exposed |
r1 |
Number of case subjects exposed |
lowthresh |
A threshold for probabilities below to be considered as zero. Defaults to 1e-12. |
A vector of permutation p-values, computed under score, likelihood ratio, Wald, and Firth tests.
perm.tests(15000, 5000, 30, 25)
perm.tests(15000, 5000, 30, 25)