For all possible absolute log2 fold changes (LFC), which genes have at least this fold change at a specified False Discovery Rate (FDR)?

limma_confects(fit, coef = NULL, fdr = 0.05, step = 0.001,
trend = FALSE, full = FALSE)

## Arguments

fit A limma MArrayLM object. Number or name of coefficient or contrast to test. False Discovery Rate to control for. Granularity of log2 fold changes to test. Should eBayes(trend=TRUE) be used? Include some further statistics used to calculate confects in the output, and also include FDR-adjusted p-values that effect size is non-zero (note that this is against the spirit of the topconfects approach).

## Value

See nest_confects for details of how to interpret the result.

## Details

Results are presented in a table such that for any given LFC, if the reader chooses the genes with abs(confect) less than this they are assured that this set of genes has at least this LFC (with the specified FDR). Once this set of genes is selected, the confect values provide confidence bounds with False Coverage-statement Rate at the same level as the FDR.

fit should be produced using lmFit. It is not necessary to use eBayes, this function calls eBayes itself.

To test contrasts, this function can also be used with the result of contrasts.fit, but limma's handling of weights may be approximate (for example if voom has been used). For exact results for a contrast, use contrastToCoef to adjust the design matrix given to lmFit.

## Examples


#Prepare a data set
library(NBPSeq)
library(edgeR)#> Warning: package ‘edgeR’ was built under R version 3.5.1#> Loading required package: limma#> Warning: package ‘limma’ was built under R version 3.5.1library(limma)
data(arab)
dgelist <- DGEList(arab)
dgelist <- calcNormFactors(dgelist)
cpms <- cpm(dgelist, log=TRUE)
# Retain genes with more than a geometric mean of 2 RPM (about 5 reads per sample)
cpms <- cpms[rowMeans(cpms) >= 1,]

# Fit linear model for each gene
treatment <- c(FALSE,FALSE,FALSE,TRUE,TRUE,TRUE)
batch <- factor(c(1,2,3,1,2,3))
design <- model.matrix(~ treatment + batch)
fit <- lmFit(cpms, design)

# Calculate top confects
# As voom has not been used, it is necessary to use trend=TRUE
limma_confects(fit, "treatmentTRUE", trend=TRUE)#> \$table
#>  rank index confect effect   AveExpr  name
#>   1    8522 2.821   4.796656 6.548250 AT3G46280
#>   2    4669 2.821   4.524867 6.032775 AT2G19190
#>   3    5913 2.745   5.005167 4.171011 AT2G39380
#>   4    2432 2.745   5.547386 3.525144 AT1G51850
#>   5    5924 2.745   4.392377 5.416364 AT2G39530
#>   6    9088 2.745   5.829935 2.914520 AT3G55150
#>   7    6260 2.717   5.421460 3.408069 AT2G44370
#>   8   14416 2.634   7.271508 3.980887 AT5G48430
#>   9    2429 2.634   4.020109 6.597740 AT1G51800
#>  10   10181 2.634   4.368572 9.140960 AT4G12500
#> ...
#> 1591 of 15666 non-zero log2 fold change at FDR 0.05
#> Prior df 8.9