Module stikpetP.other.thumb_biserial
Expand source code
import pandas as pd
def th_biserial(rb, qual="cohen"):
'''
Rule of thumb for Biserial Correlation
--------------------------
Simple function to use a rule-of-thumb for the Biserial Correlation.
Parameters
----------
rb : float
the biserial correlation value
qual : {"cohen"}, optional
indication which set of rule-of-thumb to use.
Returns
-------
pandas.DataFrame
A dataframe with the following columns:
* *classification*, the qualification of the effect size
* *reference*, a reference for the rule of thumb used
Notes
-----
Cohen's rule of thumb for biserial correlation (1988, p. 82):
|\\|r_b\\|| Interpretation|
|---|----------|
|0.00 < 0.125 | negligible |
|0.125 < 0.304 | small |
|0.304 < 0.465 | medium |
|0.465 < 1 | large |
See Also
--------
stikpetP.correlations.cor_biserial.r_biserial : to obtain the biserial correlation coefficient
References
----------
Cohen, J. (1988). *Statistical power analysis for the behavioral sciences* (2nd ed.). L. Erlbaum Associates.
Author
------
Made by P. Stikker
Companion website: https://PeterStatistics.com
YouTube channel: https://www.youtube.com/stikpet
Donations: https://www.patreon.com/bePatron?u=19398076
'''
if (qual=="cohen"):
ref = "Cohen (1988, p. 82)"
if (abs(rb)<0.125):
qual = "negligible"
elif (abs(rb)<0.304):
qual = "small"
elif (abs(rb)<0.465):
qual = "medium"
else:
qual = "large"
results = pd.DataFrame([[qual, ref]], columns=["classification", "reference"])
return(results)
Functions
def th_biserial(rb, qual='cohen')
-
Rule Of Thumb For Biserial Correlation
Simple function to use a rule-of-thumb for the Biserial Correlation.
Parameters
rb
:float
- the biserial correlation value
qual
:{"cohen"}
, optional- indication which set of rule-of-thumb to use.
Returns
pandas.DataFrame
-
A dataframe with the following columns:
- classification, the qualification of the effect size
- reference, a reference for the rule of thumb used
Notes
Cohen's rule of thumb for biserial correlation (1988, p. 82):
|r_b| Interpretation 0.00 < 0.125 negligible 0.125 < 0.304 small 0.304 < 0.465 medium 0.465 < 1 large See Also
r_biserial()
- to obtain the biserial correlation coefficient
References
Cohen, J. (1988). Statistical power analysis for the behavioral sciences (2nd ed.). L. Erlbaum Associates.
Author
Made by P. Stikker
Companion website: https://PeterStatistics.com
YouTube channel: https://www.youtube.com/stikpet
Donations: https://www.patreon.com/bePatron?u=19398076Expand source code
def th_biserial(rb, qual="cohen"): ''' Rule of thumb for Biserial Correlation -------------------------- Simple function to use a rule-of-thumb for the Biserial Correlation. Parameters ---------- rb : float the biserial correlation value qual : {"cohen"}, optional indication which set of rule-of-thumb to use. Returns ------- pandas.DataFrame A dataframe with the following columns: * *classification*, the qualification of the effect size * *reference*, a reference for the rule of thumb used Notes ----- Cohen's rule of thumb for biserial correlation (1988, p. 82): |\\|r_b\\|| Interpretation| |---|----------| |0.00 < 0.125 | negligible | |0.125 < 0.304 | small | |0.304 < 0.465 | medium | |0.465 < 1 | large | See Also -------- stikpetP.correlations.cor_biserial.r_biserial : to obtain the biserial correlation coefficient References ---------- Cohen, J. (1988). *Statistical power analysis for the behavioral sciences* (2nd ed.). L. Erlbaum Associates. Author ------ Made by P. Stikker Companion website: https://PeterStatistics.com YouTube channel: https://www.youtube.com/stikpet Donations: https://www.patreon.com/bePatron?u=19398076 ''' if (qual=="cohen"): ref = "Cohen (1988, p. 82)" if (abs(rb)<0.125): qual = "negligible" elif (abs(rb)<0.304): qual = "small" elif (abs(rb)<0.465): qual = "medium" else: qual = "large" results = pd.DataFrame([[qual, ref]], columns=["classification", "reference"]) return(results)