Module stikpetP.other.thumb_point_biserial
Expand source code
import pandas as pd
def th_point_biserial(rp, qual="cohen"):
'''
Rule of thumb for Point Biserial Correlation
--------------------------
Simple function to use a rule-of-thumb for the Point Biserial Correlation.
Parameters
----------
rp : float
the point-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 point-biserial correlation (1988, p. 82):
|\\|r_p\\|| Interpretation|
|---|----------|
|0.00 < 0.100 | negligible |
|0.100 < 0.243 | small |
|0.243 < 0.371 | medium |
|0.371 < 1 | large |
See Also
--------
stikpetP.correlations.cor_point_biserial.r_point_biserial : to obtain the point-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(rp)<0.1):
qual = "negligible"
elif (abs(rp)<0.243):
qual = "small"
elif (abs(rp)<0.371):
qual = "medium"
else:
qual = "large"
results = pd.DataFrame([[qual, ref]], columns=["classification", "reference"])
return(results)
Functions
def th_point_biserial(rp, qual='cohen')
-
Rule Of Thumb For Point Biserial Correlation
Simple function to use a rule-of-thumb for the Point Biserial Correlation.
Parameters
rp
:float
- the point-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 point-biserial correlation (1988, p. 82):
|r_p| Interpretation 0.00 < 0.100 negligible 0.100 < 0.243 small 0.243 < 0.371 medium 0.371 < 1 large See Also
r_point_biserial()
- to obtain the point-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_point_biserial(rp, qual="cohen"): ''' Rule of thumb for Point Biserial Correlation -------------------------- Simple function to use a rule-of-thumb for the Point Biserial Correlation. Parameters ---------- rp : float the point-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 point-biserial correlation (1988, p. 82): |\\|r_p\\|| Interpretation| |---|----------| |0.00 < 0.100 | negligible | |0.100 < 0.243 | small | |0.243 < 0.371 | medium | |0.371 < 1 | large | See Also -------- stikpetP.correlations.cor_point_biserial.r_point_biserial : to obtain the point-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(rp)<0.1): qual = "negligible" elif (abs(rp)<0.243): qual = "small" elif (abs(rp)<0.371): qual = "medium" else: qual = "large" results = pd.DataFrame([[qual, ref]], columns=["classification", "reference"]) return(results)