fdrisk {sgpv}R Documentation

False Discovery Risk for Second-Generation p-Values

Description

This function computes the false discovery risk (sometimes called the "empirical bayes FDR") for a second-generation p-value of 0, or the false confirmation risk for a second-generation p-value of 1.

Usage

fdrisk(
  sgpval = 0,
  null.lo,
  null.hi,
  std.err,
  interval.type,
  interval.level,
  pi0 = 0.5,
  null.weights,
  null.space,
  alt.weights,
  alt.space
)

Arguments

sgpval

The observed second-generation p-value. Default is 0, which gives the false discovery risk.

null.lo

The lower bound of the indifference zone (null interval) upon which the second-generation p-value was based

null.hi

The upper bound for the indifference zone (null interval) upon which the second-generation p-value was based

std.err

Standard error of the point estimate

interval.type

Class of interval estimate used. This determines the functional form of the power function. Options are confidence for a (1-\alpha)100% confidence interval and likelihood for a 1/k likelihood support interval (credible not yet supported).

interval.level

Level of interval estimate. If interval.type is confidence, the level is \alpha. If interval.type is likelihood, the level is 1/k (not k).

pi0

Prior probability of the null hypothesis. Default is 0.5.

null.weights

Probability distribution for the null parameter space. Options are currently Point, Uniform, and TruncNormal.

null.space

Support of the null probability distribution. If null.weights is Point, then null.space is a scalar. If null.weights is Uniform, then null.space is a vector of length two.

alt.weights

Probability distribution for the alternative parameter space. Options are currently Point, Uniform, and TruncNormal.

alt.space

Support for the alternative probability distribution. If alt.weights is Point, then alt.space is a scalar. If alt.weights is Uniform, then alt.space is a vector of length two.

Details

When possible, one should compute the second-generation p-value and FDR/FCR on a scale that is symmetric about the null hypothesis. For example, if the parameter of interest is an odds ratio, inputs pt.est, std.err, null.lo, null.hi, null.space, and alt.space are typically on the log scale.

If TruncNormal is used for null.weights, then the distribution used is a truncated Normal distribution with mean equal to the midpoint of null.space, and standard deviation equal to std.err, truncated to the support of null.space. If TruncNormal is used for alt.weights, then the distribution used is a truncated Normal distribution with mean equal to the midpoint of alt.space, and standard deviation equal to std.err, truncated to the support of alt.space. Further customization of these parameters for the truncated Normal are currently not possible, although they may be implemented in future versions.

Value

Numeric scalar representing the False discovery risk (FDR) or false confirmation risk (FCR) for the observed second-generation p-value. If sgpval = 0, the function returns false discovery risk (FDR). If sgpval = 1, the function returns false confirmation risk (FCR).

References

Blume JD, Greevy RA Jr., Welty VF, Smith JR, Dupont WD (2019). An Introduction to Second-generation p-values. The American Statistician. 73:sup1, 157-167, DOI: https://doi.org/10.1080/00031305.2018.1537893

Blume JD, D’Agostino McGowan L, Dupont WD, Greevy RA Jr. (2018). Second-generation p-values: Improved rigor, reproducibility, & transparency in statistical analyses. PLoS ONE 13(3): e0188299. https://doi.org/10.1371/journal.pone.0188299

See Also

sgpvalue, sgpower, plotsgpv, FDRestimation::p.fdr

Examples


# false discovery risk with 95% confidence level
fdrisk(sgpval = 0,  null.lo = log(1/1.1), null.hi = log(1.1),  std.err = 0.8,
  null.weights = 'Uniform', null.space = c(log(1/1.1), log(1.1)),
  alt.weights = 'Uniform',  alt.space = 2 + c(-1,1)*qnorm(1-0.05/2)*0.8,
  interval.type = 'confidence',  interval.level = 0.05)

# false discovery risk with 1/8 likelihood support level
fdrisk(sgpval = 0,  null.lo = log(1/1.1), null.hi = log(1.1),  std.err = 0.8,
  null.weights = 'Point', null.space = 0,  alt.weights = 'Uniform',
  alt.space = 2 + c(-1,1)*qnorm(1-0.041/2)*0.8,
  interval.type = 'likelihood',  interval.level = 1/8)

## with truncated normal weighting distribution
fdrisk(sgpval = 0,  null.lo = log(1/1.1), null.hi = log(1.1),  std.err = 0.8,
  null.weights = 'Point', null.space = 0,  alt.weights = 'TruncNormal',
  alt.space = 2 + c(-1,1)*qnorm(1-0.041/2)*0.8,
  interval.type = 'likelihood',  interval.level = 1/8)

# false discovery risk with LSI and wider null hypothesis
fdrisk(sgpval = 0,  null.lo = log(1/1.5), null.hi = log(1.5),  std.err = 0.8,
  null.weights = 'Point', null.space = 0,  alt.weights = 'Uniform',
  alt.space = 2.5 + c(-1,1)*qnorm(1-0.041/2)*0.8,
  interval.type = 'likelihood',  interval.level = 1/8)

# false confirmation risk example
fdrisk(sgpval = 1,  null.lo = log(1/1.5), null.hi = log(1.5),  std.err = 0.15,
  null.weights = 'Uniform', null.space = 0.01 + c(-1,1)*qnorm(1-0.041/2)*0.15,
  alt.weights = 'Uniform',  alt.space = c(log(1.5), 1.25*log(1.5)),
  interval.type = 'likelihood',  interval.level = 1/8)



[Package sgpv version 1.1.0 Index]