Find sets of discoveries for a range of effect sizes, controlling the False Discovery Rate for each set.

nest_confects(n, pfunc, fdr = 0.05, step = 0.01)

Arguments

n

Number of items being tested.

pfunc

A function(indices, effect_size) to calculate p-values. Indices is a subset of 1:n giving the p-values to be computed.

fdr

False Discovery Rate to control for.

step

Granularity of effect sizes to test.

Value

A "Topconfects" object, containing a table of results and various associated information.

The most important part of this object is the $table element, a data frame with the following columns:

  • rank - Ranking by confect and for equal confect by p-value at that effect size.

  • index - Number of the test, between 1 and n.

  • confect - CONfident efFECT size.

The usage is as follows: To find a set of tests which have effect size at least x with the specified FDR, take the rows with abs(confect) >= x.

Some tests may have been given the same confect. To maintain the FDR, all or none should be chosen.

With this caveat understood, one may essentially take the top however many rows of the data frame and these will be the best set of results of that size to dependably have an effect size that is as large as possible.

Some wrappers around this function may add a sign to the confect column, if it makes sense to do so. They will also generally add an effect column, containing an estimate of the effect size that aims to be unbiassed rather than a conservative lower bound.