simpleM: Calculation of effective number of independent tests

Description Usage Arguments Value References Examples

View source: R/powercalc.R

Description

Adapted simpleM method which considers theoretical correlation between SNP pairs instead of composite LD values. Principal component decomposition yields the effective number of independent tests. This value is needed for the Bonferroni correction of type-I error when testing SNP effects based on a single-marker model.

Usage

1
simpleM(mat, quant = 0.995)

Arguments

mat

correlation matrix

quant

percentage cutoff, variation of SNP data explained by eigenvalues; default value 0.995

Value

effective number of independent tests

References

Gao, Starmer & Martin (2008) A multiple testing correction method for genetic association studies using correlated single nucleotide polymorphisms. Genetic Epidemiology 32:361-369.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
  ### correlation matrix (should depend on sire haplotypes)
  R <- AR1(100, rho = 0.1)
  ### effective number of tests
  Meff <- simpleM(R)
  ### relative effect size given heritability and number of QTL signals
  h2 <- 0.2
  nqtl <- 2
  betaSE <- sqrt(h2 / (nqtl - nqtl * h2))
  ### optimal sample size in a single-marker approach
  pwr::pwr.t.test(d = betaSE, sig.level = 0.01 / Meff, power = 0.8,
   alternative = "two.sided", type = "one.sample")

Example output

     One-sample t test power calculation 

              n = 186.688
              d = 0.3535534
      sig.level = 1e-04
          power = 0.8
    alternative = two.sided

hscovar documentation built on April 13, 2021, 9:06 a.m.

Related to simpleM in hscovar...