Learn R Programming

MCPerm (version 1.1.4)

permuteGenotypeCount: Fill the numerics of 2*3 table when fixed the row and column totals

Description

Fill the numerics of 2*3 table when fixed the row and column totals.

Usage

permuteGenotypeCount(case_11, case_12, case_22, control_11, control_12, control_22, n)

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.
n
an integer specifying the number to generate.

Value

perm_case_11
a vector with 'n' elements.
perm_case_12
a vector with 'n' elements.
perm_case_22
a vector with 'n' elements.
perm_control_11
a vector with 'n' elements.
perm_control_12
a vector with 'n' elements.
perm_control_22
a vector with 'n' elements.

Details

Fill the numerics of 2*3 table when fixed the row and column totals, by twice generating random numbers for the hypergeometric distribution, based on the putting data.

References

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

Edgington. E.S.(1995): Randomization tests, 3rd ed.

See Also

Armitage.MCPerm, OR.MCPerm, chisq.MCPerm, fisher.MCPerm, rhyper, meta.MCPerm, permuteGenotype, chisq.TradPerm

Examples

Run this code
# permuteGenotypeCount(case_11=23,case_12=0,case_22=34,control_11=0,control_12=34,control_22=45,n=5)

Run the code above in your browser using DataLab