zsc | R Documentation |
zsc()
recovers Z-scores from P-values and corresponding effect directions
(or beta coefficients) reported by a genetic association analysis.
zsc(P, BETA)
P |
vector of P-values. |
BETA |
vector of effect directions or beta coefficients. |
For any genetic variant, its two-sided P-value (p
) and the sign of
estimated effect (\beta
) is used to recover the Z-score (z
), that
is, z = sign(\beta) \Phi^{-1}(p/2)
.
A vector of Z-scores.
dot()
## result of per-variant analysis (P-values and estimated effects)
res <- readRDS(system.file("extdata", 'rs208294_res.rds', package="dotgen"))
## recover Z-score statistics
stt <- with(res, zsc(P, BETA))
## checking
stopifnot(all.equal(pnorm(abs(stt), lower.tail = FALSE) * 2, res$P))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.