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.
simpleM(mat, quant = 0.995)
correlation matrix
percentage cutoff, variation of SNP data explained by eigenvalues; default value 0.995
effective number of independent tests
Gao, Starmer & Martin (2008) A multiple testing correction method for genetic association studies using correlated single nucleotide polymorphisms. Genetic Epidemiology 32:361-369.
# NOT RUN {
### 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")
# }
Run the code above in your browser using DataLab