Description Usage Arguments Details Value Author(s) Examples
This function compute the squared maximum of two series of pValues from the multivariate_EWAS() function. The objective of this function is to test all the markers and to determine which could be potential mediators in the exposure-outcome association.
1 |
pval1 |
vector of pValues (p*1) of exposure. |
pval2 |
vector of pValues (p*1) of ouctome. |
diagnostic.plot |
if TRUE the histogram of the p-values together with the estimate of eta0 null line is plotted. This is useful to visually check the fit of the estimated proportion of null p-values. |
... |
argument of the fdrtool function from the fdrtool package |
The pValue is computed for each markers following this formula
pV = max(pVal1, pVal2)^2
This quantity eta0, i.e. the proportion eta0 of null p-values in a given vector of p-values, is an important parameter when controlling the false discovery rate (FDR). A conservative choice is eta0 = 1 but a choice closer to the true value will increase efficiency and power - see Benjamini and Hochberg (1995, 2000) and Storey (2002) for details. We use the fdrtool package to transform pValues into qValues, which allows us to control the FDR.
an object with the following attributes:
- a pValue for each markers
- a qValue for each markers
- the eta0 of the set of pValues
Basile Jumentier
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | library(highmed)
# Run multivariate_EWAS
res <- multivariate_EWAS(X = example$X, Y = example$Y, M = example$M, K = 5)
# Run max2
res <- max2(pval1 = res$pValue[, 1], pval2 = res$pValue[, 2])
# Manhattan plot
plot(-log10(res$pval), main = paste0("Eta0 = ", round(res$eta0, 3)))
abline(h = -log10(0.05 / ncol(example$M)))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.