permQValue: Calculate q-values from DGCA class objects based on...

View source: R/permQValue.R

permQValueR Documentation

Calculate q-values from DGCA class objects based on permutation-based empirical null statistics.

Description

First, estimate empirical p-values based on a comparison of the actual and permuted test statistics. Next, estimate the proportion of true null hypotheses using the qvalue package as well as qvalues from the empirical p-values, using this value. If the estimated pi0 <= 0, then sequentially recalculates using increasingly conservative set of lambda values, until lambda = 0.5.

Usage

permQValue(dcObject, permObject, secondMat, testSlot, verbose = FALSE,
  plotFdr = FALSE)

Arguments

dcObject

The original S4 class object containing the test statistics to be extracted.

permObject

The array of matrices containing the null test statistics.

secondMat

Logical, indicating whether a second matrix was used in the construction of this dcObject and permObject. If FALSE, the upper.tri of both are extracted to avoid double counting test statistics.

testSlot

The slot of the dcObject to be removed for use as the actual test statistic.

verbose

Whether summaries of the q-value operations should be reported.

plotFdr

Allows for plotting of fdrtool p-value adjustment result OR empirical FDR q-value adjustment technique, if either of these are chosen. Requires fdrtool package OR qvalue package. Default = FALSE.

Value

A list containing a vectof of empirical p-values and a vector of q-values, both of the same length as the original actual test statistics.


andymckenzie/DGCA documentation built on Sept. 15, 2023, 5:04 a.m.