Description Usage Arguments Details Value Author(s) Examples
Perform a number of PRS simulations
with gwasFast
and prsInf
and average over the results.
Supports parallelization on multicore CPUs.
1 | prsMultitest(signal, N, Nsim, nthreads = 0, minpv = 1e-20)
|
signal |
Vector of effect sizes for all SNPs. |
N |
GWAS sample size. |
Nsim |
Number of simulations to perform. |
nthreads |
Number of parallel threads to use. |
minpv |
The simulated PRS performance is recorded on the interval
from |
The function uses parallel
package
for multithreaded calculations.
The function returns the vector of p-value thresholds
and corresponding average
asymptotic correlations of
the phenotype with PRS (r
).
Andrey A Shabalin andrey.shabalin@gmail.com
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | NTotalSNPs = 10000
NSignalSnps = 100
heritability = 0.2
signalDistr = "Same"
Ntrain = 10000
Ntest = 3000
signal = genSignal(
NSignalSnps = NSignalSnps,
NTotalSNPs = NTotalSNPs,
heritability = heritability,
signalDistr = signalDistr)
prsA = prsMultitest(signal = signal, N = Ntrain, Nsim = 30, nthreads = 1)
rci = rConfInt(r = prsA$r, N = Ntest)
prsPlot(pv = prsA$pv, r = prsA$r, rci)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.