fbreitwieser / isobar

isobar - R library for the Analysis and quantitation of isobarically tagged MSMS proteomics data
https://bioconductor.org/packages/release/bioc/html/isobar.html
9 stars 8 forks source link

Correct P(X>=Y) #10

Closed alyst closed 9 years ago

alyst commented 9 years ago

PR changes the way P(X>=Y) is calculated. Instead of using the joint density pdf[X](u) pdf[Y](v) and integrating over 2D plane, it integrates pdf[X](t) cdf[Y](t) over (-inf,+inf) using R's built-in integrate(). It should be faster and more accurate. However, the behaviour of integrate() is not perfect: for very small P-values the default rel.tol results in P-values with high relative error (same order of magnitude, but the digits are incorrect); reducing rel.tol helps, but then the method reports roundoff error for non-significant cases.