Open mattwigway opened 4 years ago
The idea was to have this function be agnostic of whether or not alpha is being corrected. This way the user is free to pass in whatever value of alpha they would like. This could be clearer, but in any event I don't think the docs are misleading as they do not mention any correction. At the moment, critical_tval()
does it automatically return values that consider a correction (at 95% confidence) and would be default behavior. The thinking was that once the user is wanting to input their own value, the function should be flexible enough to take corrected or uncorrected input. This might not be the most intuitive but at the time it seemed like the best way to be able to simultaneously direct users towards appropriate/ common usage and allow customization.
I think if we would make this clearer is to add a parameter in the critical_tval()
and default to multiTesting = True
, to make this more explicit. And if user needs the ordinary t value, they could manually set it to False.
I think the docs on critical_tval are unclear. I expected critical_tval(0.05) to produce the t value for a two-tailed test corrected for multiple testing, but it actually is just a passthrough to t.ppf (with a function to account for two-tailed tests). It should be documented that you need to use adj_alpha to account for multiple testing.