zepid.calc.utils.counternull_pvalue

zepid.calc.utils.counternull_pvalue(estimate, lcl, ucl, sided='two', alpha=0.05, decimal=3)

Calculates the counternull p-value. It is useful to prevent over-interpretation of results

Parameters:
  • estimate (float) – Point estimate for result
  • lcl (float) – Lower confidence limit
  • ucl (float) – Upper confidence limit
  • sided (string, optional) –

    Whether to compute the upper one-sided, lower one-sided, or two-sided counternull p-value. Default is the two-sided

    • ’upper’ Upper one-sided p-value
    • ’lower’ Lower one-sided p-value
    • ’two’ Two-sided p-value
  • alpha (float, optional) – Alpha level for p-value. Default is 0.05. Verify that this is the same alpha used to generate confidence intervals
  • decimal (integer, optional) – Number of decimal places to display. Default is three
Returns:

Function does not return an object. It prints results to the console

Return type:

None

Notes

Make sure that the confidence interval points put into the equation match the alpha level calculation

Examples

Calculate the counternull p-value for a single estimate and confidence interval

>>> from zepid.calc import counternull_pvalue
>>> counternull_pvalue(-0.1, -0.3, 0.1)

References

Rosenthal R, Rubin DB. (1994). The counternull value of an effect size: A new statistic. Psychological Science, 5(6), 329-334.