-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
p-adj values in pairwise_tukeyhsd and MultiComparison bounded by 0.001 and 0.9 #8185
Comments
AFAIK, that's a limitation about how our p-values are implemented in qsturng. However:
tukey-hsd already corrects for multiple testing FWER. Why are you still using FDR p-value correction after that? |
You are right that it corrects for multiple testing. but only in a specific column in my example above it is called M2 (molecule #2). As for #8035 not sure I understood how to combine scipy and statsmodels to have correct p-values |
you need to have the latest scipy release and the development version of statsmodels. I found nightly version, but never tried those out otherwise statsmodels main needs to be installed from github I'm not yet on the latest scipy, but scipy stats has now also tukey-hsd, which you should be able to use |
As for :
It was a bit confusing avouand did not try. But the last option:
Used the link above and p-values are much more accurate and more similar to those in the R package. Thank you very much!! |
However, the values in the lower and upper confidence interval have opposite values in tukey_hsd in scipy.stats
|
what do you mean with opposite values? pair differences can go either way y0 - y1 or y1 - y0 |
Describe the bug
Dear developer,
when I'm running pairwise_tukeyhsd or MultiComparison.tukeyhsd I see that the values in p-adj are bounded from below by 0.001 and from about by 0.9. I see that when I compare to R test TukeyHSD the values of the p-adj can be higher than 0.9 and smaller then 0.001.
This is a problem for me since I have many other of the column M# (i.e, M1, M2, ..., M900)
and I'll want to adjust with FDR (False discovery rate )for these values afterward. To do so, values that are much smaller the 0.001 are rounded to 0.001 and will not be significant after FDR.
Code Sample python:
Code Sample R for the same data:
I have run these for different values of the Columns 'M#' (i.e, M1, ...,M900)
There is a difference in the values in the adj-pvalue but they are somewhat close between R and python, however, in statsmodels they are always bounded by 0.001 and 0.9.
is it possible to change it?
Kindly help,
Tal
The text was updated successfully, but these errors were encountered: