dcAdjust {dcanr} | R Documentation

## Adjust for multiple testing in differential association analysis

### Description

Adjust for multiple hypothesis testing after performing statistical tests using `dcTest`. This can be performed using a method provided by the users. `p.adjust` is used by default.

### Usage

    dcAdjust(dcpvals, f = stats::p.adjust, ...)

### Arguments

`dcpvals` | a matrix, the result of the `dcTest` function. The results should be passed as produced by the function and not modified in intermediate steps
`f` | a function, the function to be used for adjustment. `p.adjust` from the `stats` package is the default with the specific adjustment method 'fdr' used. The range of available methods can be accessed using `p.adjust.methods`. Custom functions should accept a numeric vector of p-values as the first argument
`...` | additional parameters to the adjustment function such as `method`

### Details

Ensure that the p-value matrix passed to this function is the one produced by `dcTest`. Any modification to the result matrix will result in failure of the function.

This method applies the adjustment method only to one triangle of the matrix to ensure adjustment is not performed for duplicated tests (symmetric matrix). As results from the DiffCoEx and EBcoexpress do not produce p-values, this method does not change anything thereby returning the original matrix.

### Value

a matrix, of adjusted p-values (or scores in the case of DiffCoEx and EBcoexpress) representing significance of differential associations.

### See Also

`dcTest` `p.adjust`

### Examples

    x <- matrix(rnorm(60), 2, 30)
    cond <- rep(1:2, 15)
    zscores <- dcScore(x, cond)
    pvals <- dcTest(zscores, emat = x, condition = cond)
    dcAdjust(pvals, p.adjust, method = 'fdr')

[Package dcanr version 1.0.0 Index]