Description Usage Arguments Value Examples
A grid [nstart, nmax]
for possible sample size is
considered. Instead of executing a time-consuming grid search, the method
of bisection is applied to this interval. For each step, the function
pwr.normtest
is called for the given set of parameters.
1 2 3 4 5 6 7 8 9 10 11 | search.best.n.bisection(
R,
betaSE,
lambda,
pos,
nstart,
nmax,
weights = 1,
typeII = 0.2,
alpha = 0.01
)
|
R |
(p x p) matrix containing theoretical correlation between SNP pairs |
betaSE |
effect size relative to residual standard deviation |
lambda |
shrinkage parameter |
pos |
vector (LEN nqtl) of SNP indices for assumed QTL positions |
nstart |
minimum value for grid search |
nmax |
maximum value for grid search |
weights |
vector (LEN p) of SNP-specific weights or scalar if weights are equal for all SNPs; default value 1 |
typeII |
type-II error level; default value 0.2 |
alpha |
type-I error level; default value 0.01 |
integer of optimal sample size
1 2 3 4 5 6 | ### correlation matrix (should depend on sire haplotypes)
R <- AR1(100, rho = 0.1)
### positions of putative QTL signals
pos <- c(14, 75)
### optimal sample size
search.best.n.bisection(R, 0.35, 1200, pos, 10, 5000)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.