mgwr icon indicating copy to clipboard operation
mgwr copied to clipboard

docs: document critical_tval

Open mattwigway opened this issue 4 years ago • 2 comments

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.

mattwigway avatar Feb 14 '20 21:02 mattwigway

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.

TaylorOshan avatar Feb 19 '20 03:02 TaylorOshan

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.

Ziqi-Li avatar Feb 19 '20 16:02 Ziqi-Li