# 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