fdr: Determine which associations are significant

Description Usage Arguments Value Note

View source: R/fdr.R

Description

Determines which associations are significant using emperical bayes and false discovery rate adjustment.

Usage

1
2
fdr(scores, threshold = 0.05, transformation = NULL, robust = TRUE,
  include_likelihood = FALSE, show_plot = TRUE, ignore_zeroes = TRUE)

Arguments

scores

Either a vector or a symmetric matrix of association scores.

threshold

The threshold for false discovery rate, used to determine significance; scores with ikelihood ratios above this threshold are set to zero. If NULL, all scores are preserved.

transformation

(option) Function applied to scores before estimating the null distribution. If provided, the function should take a vector as input and return a vector for output.

robust

Should robust estimates of mean and variance be used?

include_likelihood

Should the matrix of likelihood ratios be provided in the output?

show_plot

If true, a histogram of scores with estimated density and null distribution is plotted.

ignore_zeroes

If true, zeroes in scores input will be ignored.

gene_names

(optional) Vector of gene names.

Value

A list containing: scores, the scores with non-significant values set to zero; mu_f0, the estimate of mu for the null distribution; sigma_f0, the estimate of sigma for the null distribution; f, the empirical density estimate; and likelihood, (optional) the likelihood ratios (fdr rates) for each score.

Note

The robust estimators used are median and MAD. If the majority of scores are zero, the robust estimate for sigma might be zero; in this case the usual estimator is used instead.


tgrimes/dnapath2 documentation built on May 21, 2020, 5:53 p.m.