fdp_sd {stepdownfdp}R Documentation

Convert winning scores and labels into discoveries

Description

fdp_sd takes the output of mirandom and additional statistical parameters to return the indices and winning scores of hypotheses that were rejected.

Usage

fdp_sd(
  scores_and_labels,
  alpha,
  conf,
  c = 0.5,
  lambda = 0.5,
  procedure = "standard"
)

Arguments

scores_and_labels

An m x 2 matrix obtained via mirandom.

alpha

An FDP threshold.

conf

To control the FDP with 1 - conf confidence.

c

Determines the ranks of the target score that are considered winning. Defaults to c = 0.5 for single-decoy FDP-SD.

lambda

Determines the ranks of the target score that are considered losing. Defaults to lambda = 0.5 for single-decoy FDP-SD.

procedure

Takes a value of "standard" (for non-randomised FDP-SD) or "coinflip" (for randomised FDP-SD).

Value

A list of 2 objects: the winning scores (discoveries) and indices (discoveries_ind) of rejected hypotheses.

Examples

set.seed(123)
target_scores <- rnorm(200, mean = 1.5)
decoy_scores <- matrix(rnorm(600, mean = 0), ncol = 3)
scores <- cbind(target_scores, decoy_scores)
scores_and_labels <- mirandom(scores)
fdp_sd(scores_and_labels, alpha = 0.1, conf = 0.1)

[Package stepdownfdp version 1.0.0 Index]