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

Share:

Description

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

Usage

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

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.

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.

Author(s)

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

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

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

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.