Armitage.MCPerm: A Monte Carlo permutation method for Armitage's trend test in...

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/Armitage.MCPerm.R

Description

A Monte Carlo permutation method for Armitage's trend test in case/control association study.

Usage

1
2
Armitage.MCPerm(case_11, case_12, case_22, control_11, control_12, control_22, 
    repeatNum = 1000)

Arguments

case_11

a non-negative integer, the frequency of genotype "allele1/allele1" in case samples.

case_12

a non-negative integer, the frequency of genotype "allele1/allele2" in case samples.

case_22

a non-negative integer, the frequency of genotype "allele2/allele2" in case samples.

control_11

a non-negative integer, the frequency of genotype "allele1/allele1" in control samples.

control_12

a non-negative integer, the frequency of genotype "allele1/allele2" in control samples.

control_22

a non-negative integer, the frequency of genotype "allele2/allele2" in control samples

repeatNum

an integer(default 1000) specifying the number of replicates used in the Monte Carlo permutation.

Details

The Cochran-Armitage test for trend, is used in categorical data analysis when the aim is to assess for the presence of an association between a variable with two categories and a variable with k categories. It modifies the Pearson chi-squared test to incorporate a suspected ordering in the effects of the k categories of the second variable. The trend test is ofen used as a genotype-based test for case/control genetic association studies.

"Armitage.MCPerm" simulates permutation method to correct p value, by twice generating random numbers for the hypergeometric distribution based on the genotype statistic of original data. Seealso chisq.MCPerm.

Value

pValue

the p value for the test.

obsStatistic

the statistic of Armitage's trend test for the true data.

obsP

the p value for Armitage's trend test of the true data.

permStatistic

a vector with 'repeatNum' elements, the statistic of Armitage's trend test for the simulation data.

permP

a vector with 'repeatNum' elements, the p value for Armitage's trend test for the simulation data.

Author(s)

Lanying Zhang and Yongshuai Jiang <jiangyongshuai@gmail.com>

References

William S Noble(Nat Biotechnol.2009): How does multiple testing correction work?

statgen.org(2007): A derivation for Armitage's trend test for the 2x3 genotype table.

See Also

OR, OR.TradPerm, OR.MCPerm, Armitage, Armitage.TradPerm, chisq.test, chisq.TradPerm, chisq.MCPerm, fisher.test, fisher.TradPerm, fisher.MCPerm, meta, meta.TradPerm, meta.MCPerm, permuteGenotype, rhyper, permuteGenotypeCount, genotypeStat

Examples

1
2
## Armitage.MCPerm(case_11=4,case_12=1,case_22=1,control_11=3,
  # control_12=5,control_22=7,repeatNum=10000)

Example output

Loading required package: metafor
Loading required package: Matrix
Loading 'metafor' package (version 2.0-0). For an overview 
and introduction to the package please type: help(metafor).

MCPerm documentation built on May 29, 2017, 11:27 a.m.