Learn R Programming

ashr (version 2.2-63)

Methods for Adaptive Shrinkage, using Empirical Bayes

Description

The R package 'ashr' implements an Empirical Bayes approach for large-scale hypothesis testing and false discovery rate (FDR) estimation based on the methods proposed in M. Stephens, 2016, "False discovery rates: a new deal", . These methods can be applied whenever two sets of summary statistics---estimated effects and standard errors---are available, just as 'qvalue' can be applied to previously computed p-values. Two main interfaces are provided: ash(), which is more user-friendly; and ash.workhorse(), which has more options and is geared toward advanced users. The ash() and ash.workhorse() also provides a flexible modeling interface that can accommodate a variety of likelihoods (e.g., normal, Poisson) and mixture priors (e.g., uniform, normal).

Copy Link

Version

Install

install.packages('ashr')

Monthly Downloads

3,961

Version

2.2-63

License

GPL (>= 3)

Issues

Pull Requests

Stars

Forks

Last Published

August 21st, 2023

Functions in ashr (2.2-63)

comp_mean.tnormalmix

comp_mean.tnormalmix
comp_cdf_conv.normalmix

comp_cdf_conv.normalmix
comp_mean.normalmix

comp_mean.normalmix
dens_conv

dens_conv
calc_vloglik

Compute vector of loglikelihood for data from ash fit
comp_mean

Generic function of calculating the first moment of components of the mixture
dlogf

The log-F distribution
comp_postmean2

comp_postmean2
comp_postmean

comp_postmean
comp_cdf

Generic function of computing the cdf for each component
get_lfsr

Return lfsr from an ash object
get_density

Density method for ash object
comp_mean2

Generic function of calculating the second moment of components of the mixture
comp_postprob

comp_postprob
comp_postsd

comp_postsd
lik_binom

Likelihood object for Binomial error distribution
lik_logF

Likelihood object for logF error distribution
log_comp_dens_conv.unimix

log density of convolution of each component of a unif mixture
loglik_conv

loglik_conv
loglik_conv.default

loglik_conv.default
mixEM

Estimate mixture proportions of a mixture model by EM algorithm
mixprop

Generic function of extracting the mixture proportions
get_post_sample

Sample from posterior
dens

Find density at y, a generic function
cxxMixSquarem

Brief description of function.
igmix

Constructor for igmix class
mixIP

Estimate mixture proportions of a mixture model by Interior Point method
cdf.ash

cdf method for ash object
cdf_conv

cdf_conv
comp_dens_conv.normalmix

comp_dens_conv.normalmix
mixmean2

Generic function of calculating the overall second moment of the mixture
my_etruncgamma

mean of truncated gamma distribution
mixcdf.default

mixcdf.default
comp_dens_conv.unimix

density of convolution of each component of a unif mixture
my_etrunclogf

my_etrunclogf
my_etruncnorm

Expected Value of Truncated Normal
comp_dens

Generic function of calculating the component densities of the mixture
post_sample.unimix

post_sample.unimix
post_sample.normalmix

post_sample.normalmix
mixSQP

Estimate mixture proportions of a mixture model using mix-SQP algorithm.
mixVBEM

Estimate posterior distribution on mixture proportions of a mixture model by a Variational Bayes EM algorithm
postsd

postsd
my_etrunct

my_etrunct
postmean2

postmean2
comp_sd

Generic function to extract the standard deviations of components of the mixture
comp_sd.normalmix

comp_sd.normalmix
w_mixEM

Estimate mixture proportions of a mixture model by EM algorithm (weighted version)
mixcdf

mixcdf
postmean

postmean
posterior_dist

Compute Posterior
summary.ash

Summary method for ash object
tnormalmix

Constructor for tnormalmix class
my_e2truncbeta

second moment of truncated Beta distribution
comp_sd.tnormalmix

comp_sd.normalmix
compute_lfsr

Function to compute the local false sign rate
lik_normal

Likelihood object for normal error distribution
lik_normalmix

Likelihood object for normal mixture error distribution
comp_dens_conv

comp_dens_conv
my_e2truncnorm

Expected Squared Value of Truncated Normal
log_comp_dens_conv

log_comp_dens_conv
my_e2truncgamma

second moment of truncated gamma distribution
log_comp_dens_conv.normalmix

log_comp_dens_conv.normalmix
estimate_mixprop

Estimate mixture proportions of a mixture g given noisy (error-prone) data from that mixture.
ncomp

ncomp
my_vtruncnorm

Variance of Truncated Normal
pm_on_zero

Generic function to extract which components of mixture are point mass on 0
lik_t

Likelihood object for t error distribution
gen_etruncFUN

gen_etruncFUN
lik_pois

Likelihood object for Poisson error distribution
ncomp.default

ncomp.default
my_etruncbeta

mean of truncated Beta distribution
plogf

The log-F distribution
plot.ash

Plot method for ash object
pcdf_post

pcdf_post
normalmix

Constructor for normalmix class
post_sample

post_sample
my_e2trunct

my_e2trunct
prune

prune
print.ash

Print method for ash object
plot_diagnostic

Diagnostic plots for ash object
vcdf_post

vcdf_post
unimix

Constructor for unimix class
qval.from.lfdr

Function to compute q values from local false discovery rates
set_data

Takes raw data and sets up data object for use by ash
calc_null_loglik

Compute loglikelihood for data under null that all beta are 0
ashr

ashr
calc_mixmean

Generic function of calculating the overall mean of the mixture
ash_pois

Performs adaptive shrinkage on Poisson data
calc_null_vloglik

Compute vector of loglikelihood for data under null that all beta are 0
calc_logLR

Compute loglikelihood ratio for data from ash fit
calc_mixsd

Generic function of calculating the overall standard deviation of the mixture
ashci

Credible Interval Computation for the ash object
ash

Adaptive Shrinkage
calc_loglik

Compute loglikelihood for data from ash fit
calc_vlogLR

Compute vector of loglikelihood ratio for data from ash fit
cdf_post

cdf_post
comp_cdf_conv

comp_cdf_conv
comp_cdf_conv.unimix

cdf of convolution of each component of a unif mixture
comp_cdf_post

comp_cdf_post