Adjusts a given a set of p-values using FDR and returns a vector of logical values indicating whether the value is less than or equal to the threshold FDR.

threshold_fdr(correlation_values, mask_indices = NULL, maximum_fdr = 0.1)

Arguments

correlation_values

A data frame with p-values in column `pvalue`.

mask_indices

A logical vector to indicate whether a covariate has missing values and should be skipped when computing FDR.

maximum_fdr

Maximum allowable false discovery rate (FDR). Defaults to 0.1.

Examples

if (FALSE) {
correlation_values <- data.frame(
  compare = "PC1 (23.16%)",
  covariates = "batch",
  pvalue = 0.56519736,
  r = "0.05729811"
  )
}