Package: ashr 2.2-66

Peter Carbonetto

ashr: Methods for Adaptive Shrinkage, using Empirical Bayes

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", <doi:10.1093/biostatistics/kxw041>. 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).

Authors:Matthew Stephens [aut], Peter Carbonetto [aut, cre], Chaoxing Dai [ctb], David Gerard [aut], Mengyin Lu [aut], Lei Sun [aut], Jason Willwerscheid [aut], Nan Xiao [aut], Mazon Zeng [ctb]

ashr_2.2-66.tar.gz
ashr_2.2-66.zip(r-4.5)ashr_2.2-66.zip(r-4.4)ashr_2.2-66.zip(r-4.3)
ashr_2.2-66.tgz(r-4.4-x86_64)ashr_2.2-66.tgz(r-4.4-arm64)ashr_2.2-66.tgz(r-4.3-x86_64)ashr_2.2-66.tgz(r-4.3-arm64)
ashr_2.2-66.tar.gz(r-4.5-noble)ashr_2.2-66.tar.gz(r-4.4-noble)
ashr_2.2-66.tgz(r-4.4-emscripten)ashr_2.2-66.tgz(r-4.3-emscripten)
ashr.pdf |ashr.html
ashr/json (API)
NEWS

# Install 'ashr' in R:
install.packages('ashr', repos = c('https://stephens999.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/stephens999/ashr/issues

Uses libs:
  • c++– GNU Standard C++ Library v3

On CRAN:

83 exports 79 stars 5.15 score 10 dependencies 16 dependents 12 mentions 732 scripts 3.2k downloads

Last updated 4 months agofrom:6786aa1511. Checks:OK: 9. Indexed: yes.

TargetResultDate
Doc / VignettesOKSep 12 2024
R-4.5-win-x86_64OKSep 12 2024
R-4.5-linux-x86_64OKSep 12 2024
R-4.4-win-x86_64OKSep 12 2024
R-4.4-mac-x86_64OKSep 12 2024
R-4.4-mac-aarch64OKSep 12 2024
R-4.3-win-x86_64OKSep 12 2024
R-4.3-mac-x86_64OKSep 12 2024
R-4.3-mac-aarch64OKSep 12 2024

Exports:ashash_poisash.workhorseashcicalc_loglikcalc_logLRcalc_mixsdcalc_null_loglikcalc_null_vloglikcalc_vloglikcalc_vlogLRcdf_postcdf.ashcomp_cdfcomp_cdf_postcomp_denscomp_meancomp_postmeancomp_postmean2comp_postprobcomp_postsdcomp_sdcompute_lfsrcxxMixSquaremdensdlogfestimate_mixpropget_densityget_fitted_gget_lfdrget_lfsrget_loglikget_logLRget_npget_pi0get_pmget_post_sampleget_ppget_psdget_qvalueget_svalueigmixlik_binomlik_logFlik_normallik_normalmixlik_poislik_tloglik_convmixcdfmixEMmixIPmixpropmixSQPmixVBEMmy_e2truncbetamy_e2truncgammamy_e2truncnormmy_e2trunctmy_etruncbetamy_etruncgammamy_etrunclogfmy_etruncnormmy_etrunctmy_vtruncnormncompnormalmixpcdf_postplogfplot_diagnosticpm_on_zeropost_sampleposterior_distpostmeanpostmean2postsdpruneqval.from.lfdrset_datatnormalmixunimixvcdf_postw_mixEM

Dependencies:etrunctinvgammairlbalatticeMatrixmixsqpRcppRcppArmadilloSQUAREMtruncnorm

Illustration of Adaptive Shrinkage

Rendered fromadaptive_shrinkage.Rmdusingknitr::rmarkdownon Sep 12 2024.

Last update: 2017-01-19
Started: 2017-01-19

Readme and manuals

Help Manual

Help pageTopics
Adaptive Shrinkageash ash.workhorse
Performs adaptive shrinkage on Poisson dataash_pois
Credible Interval Computation for the ash objectashci
ashrashr-package ashr
Compute loglikelihood for data from ash fitcalc_loglik
Compute loglikelihood ratio for data from ash fitcalc_logLR
Generic function of calculating the overall mean of the mixturecalc_mixmean
Generic function of calculating the overall standard deviation of the mixturecalc_mixsd
Compute loglikelihood for data under null that all beta are 0calc_null_loglik
Compute vector of loglikelihood for data under null that all beta are 0calc_null_vloglik
Compute vector of loglikelihood for data from ash fitcalc_vloglik
Compute vector of loglikelihood ratio for data from ash fitcalc_vlogLR
cdf_convcdf_conv
cdf_postcdf_post
cdf method for ash objectcdf.ash
Generic function of computing the cdf for each componentcomp_cdf
comp_cdf_convcomp_cdf_conv
comp_cdf_conv.normalmixcomp_cdf_conv.normalmix
cdf of convolution of each component of a unif mixturecomp_cdf_conv.unimix
comp_cdf_postcomp_cdf_post
Generic function of calculating the component densities of the mixturecomp_dens
comp_dens_convcomp_dens_conv
comp_dens_conv.normalmixcomp_dens_conv.normalmix
density of convolution of each component of a unif mixturecomp_dens_conv.unimix
Generic function of calculating the first moment of components of the mixturecomp_mean
comp_mean.normalmixcomp_mean.normalmix
comp_mean.tnormalmixcomp_mean.tnormalmix
Generic function of calculating the second moment of components of the mixturecomp_mean2
comp_postmeancomp_postmean
comp_postmean2comp_postmean2
comp_postprobcomp_postprob
comp_postsdcomp_postsd
Generic function to extract the standard deviations of components of the mixturecomp_sd
comp_sd.normalmixcomp_sd.normalmix
comp_sd.normalmixcomp_sd.tnormalmix
Function to compute the local false sign ratecompute_lfsr
Brief description of function.cxxMixSquarem
Find density at y, a generic functiondens
dens_convdens_conv
The log-F distributiondlogf
Estimate mixture proportions of a mixture g given noisy (error-prone) data from that mixture.estimate_mixprop
gen_etruncFUNgen_etruncFUN
Density method for ash objectget_density
Return lfsr from an ash objectget_fitted_g get_lfdr get_lfsr get_loglik get_logLR get_np get_pi0 get_pm get_pp get_psd get_qvalue get_svalue
Sample from posteriorget_post_sample
Constructor for igmix classigmix
Likelihood object for Binomial error distributionlik_binom
Likelihood object for logF error distributionlik_logF
Likelihood object for normal error distributionlik_normal
Likelihood object for normal mixture error distributionlik_normalmix
Likelihood object for Poisson error distributionlik_pois
Likelihood object for t error distributionlik_t
log_comp_dens_convlog_comp_dens_conv
log_comp_dens_conv.normalmixlog_comp_dens_conv.normalmix
log density of convolution of each component of a unif mixturelog_comp_dens_conv.unimix
loglik_convloglik_conv
loglik_conv.defaultloglik_conv.default
mixcdfmixcdf
mixcdf.defaultmixcdf.default
Estimate mixture proportions of a mixture model by EM algorithmmixEM
Estimate mixture proportions of a mixture model by Interior Point methodmixIP
Generic function of calculating the overall second moment of the mixturemixmean2
Generic function of extracting the mixture proportionsmixprop
Estimate mixture proportions of a mixture model using mix-SQP algorithm.mixSQP
Estimate posterior distribution on mixture proportions of a mixture model by a Variational Bayes EM algorithmmixVBEM
second moment of truncated Beta distributionmy_e2truncbeta
second moment of truncated gamma distributionmy_e2truncgamma
Expected Squared Value of Truncated Normalmy_e2truncnorm
my_e2trunctmy_e2trunct
mean of truncated Beta distributionmy_etruncbeta
mean of truncated gamma distributionmy_etruncgamma
my_etrunclogfmy_etrunclogf
Expected Value of Truncated Normalmy_etruncnorm
my_etrunctmy_etrunct
Variance of Truncated Normalmy_vtruncnorm
ncompncomp
ncomp.defaultncomp.default
Constructor for normalmix classnormalmix
pcdf_postpcdf_post
The log-F distributionplogf
Diagnostic plots for ash objectplot_diagnostic
Plot method for ash objectplot.ash
Generic function to extract which components of mixture are point mass on 0pm_on_zero
post_samplepost_sample
post_sample.normalmixpost_sample.normalmix
post_sample.unimixpost_sample.unimix
Compute Posteriorposterior_dist
postmeanpostmean
postmean2postmean2
postsdpostsd
Print method for ash objectprint.ash
pruneprune
Function to compute q values from local false discovery ratesqval.from.lfdr
Takes raw data and sets up data object for use by ashset_data
Summary method for ash objectsummary.ash
Constructor for tnormalmix classtnormalmix
Constructor for unimix classunimix
vcdf_postvcdf_post
Estimate mixture proportions of a mixture model by EM algorithm (weighted version)w_mixEM