Learn R Programming

AUtests (version 0.97)

perm.test.strat: Stratified permutation testing

Description

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).

Usage

perm.test.strat(m0list, m1list, r0list, r1list)

Arguments

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

Value

  • A permutation p-value, computed under the likelihood ratio test.

Examples

Run this code
perm.test.strat(c(7000, 1000), c(11000, 1000), c(50, 30), c(70, 40))

Run the code above in your browser using DataLab