Dear list,

Is there any interest in adding a log.p= option to p.adjust() so that it can accept log-transformed p-values and return log-transformed adjusted p-values?

I have some functions that, on occasion, return very low p-values. To avoid underflow in such cases, I allow my users to set log.p=TRUE, which is passed onto pt(), pchisq(), etc. to return log-transformed p-values. However, currently, these log-p-values need to be run through exp() before being used in p.adjust(). This re-introduces the possibility of underflow errors, sometimes leading to adjusted p-values of zero.

The proposed log.p= mode for p.adjust() would perform all operations in the log-scale to avoid this - see https://github.com/MarioniLab/scran/blob/f9ace20d74c7fdbde613aaf91311cdfc6dbe0feb/R/utils_markers.R#L184-L190 for an example with the BH correction. If it were available, we could conveniently pass along the log.p=TRUE option to p.adjust() as we do for pt() and friends, and everything would "just work".

If this sounds sensible, I would be happy to put a patch together; the modifications involved seem simple enough.

Best,

Aaron

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to