calc_fdr_conditional: Calculate the empirical false discovery rate (FDR) after...

Description Usage Arguments Value Note

View source: R/fdr.R

Description

Calculate the empirical false discovery rate (FDR) given a vector of posterior probabilities and a specified threshold, adjusting for false positives identified by conditional analysis.

Usage

1
calc_fdr_conditional(post_prob, threshold, fail_idx)

Arguments

post_prob

numeric vector of posterior probabilities.

threshold

numerical value of the posterior probability threshold at which to calculate the empirical FDR.

fail_idx

integer vector of the indices of observations which "failed" conditional analysis. These are the observations where the association pattern with the highest posterior probability changed after conditioning. See important Note.

Value

A numeric value of the empirical false discovery rate (FDR).

Note

Note that if using collapsed posterior probability categories, an observation where the association pattern with the highest posterior probability changes may not indicate "failure" if the new pattern still fits the description of the collapsed category. For example, if testing "associated with at least 1 trait," an observation that changes from "associated with 2" to "associated with 1" may not be considered failure. In such cases, the user may wish fail_idx to represent cases where the highest association pattern no longer fits the description of the collapsed category.


kjgleason/Primo documentation built on Sept. 7, 2021, 3:58 a.m.