Module stikpetP.correlations.cor_rosenthal

Expand source code
import pandas as pd

def r_rosenthal(zVal, n):
    '''
    Rosenthal Correlation Coefficient
    ---------------------------------
     
    This function will calculate Rosenthal Correlation Coefficient. A simple correlation coefficient that divides a z-score by the square root of the sample size.

    This function is shown in this [YouTube video](https://youtu.be/WTbsyIdWfGg) and the effect size is also described at [PeterStatistics.com](https://peterstatistics.com/Terms/Correlations/RosenthalCorrelationCoefficient.html)
    
    Parameters
    ----------
    zVal : float
        the z-value of test
    n : int
        the sample size
        
    Returns
    -------
    r : float
        the Rosenthal correlation coefficient value.
   
    Notes
    -----
    The formula used (Rosenthal, 1991, p. 19):
    $$r = \\frac{z}{\\sqrt{n}}$$
    
    *Symbols used:*
    
    * $n$ the sample size
    * $z$ the calculated z-statistic value
    
    Rosenthal (1991) is the oldest reference I could find for this correlation coefficient. However, Cohen (1988, p. 275) actually has a measure 'f' that has the same equation.
    
    Before, After and Alternatives
    ------------------------------
    Before this effect size / correlation you might first want to perform a test. Any test that uses a z-value could be used for example:
    * [ts_score_os](../tests/test_score_os.html#ts_score_os) for One-Sample Score Test
    * [ts_wald_os](../tests/test_wald_os.html#ts_wald_os) for One-Sample Wald Test
    * [ts_wilcoxon_os](../tests/test_wilcoxon_os.html#ts_wilcoxon_os) for Wilcoxon Signed Rank Test (One-Sample) with a normal approximation

    After this you might want to use the rules-of-thumb for a Pearson Correlation or Cohen f:
    * [th_pearson_r](../other/thumb_pearson_r.html#th_pearson_r) for rules of thumb for a Pearson correlation coefficient
    * [th_cohen_f](../other/thumb_cohen_f.html#th_cohen_f) for rules of thumb for a Cohen f
    
    References 
    ----------
    Cohen, J. (1988). *Statistical power analysis for the behavioral sciences* (2nd ed.). L. Erlbaum Associates.
    
    Rosenthal, R. (1991). *Meta-analytic procedures for social research* (Rev. ed). Sage Publications.
    
    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
    
    Examples
    --------
    >>> z = 1.143943
    >>> n = 20
    >>> r_rosenthal(z, n)
    0.25579343103850416
    
    '''
    
    r = abs(zVal / (n**0.5))
    
    return (r)

Functions

def r_rosenthal(zVal, n)

Rosenthal Correlation Coefficient

This function will calculate Rosenthal Correlation Coefficient. A simple correlation coefficient that divides a z-score by the square root of the sample size.

This function is shown in this YouTube video and the effect size is also described at PeterStatistics.com

Parameters

zVal : float
the z-value of test
n : int
the sample size

Returns

r : float
the Rosenthal correlation coefficient value.

Notes

The formula used (Rosenthal, 1991, p. 19): r = \frac{z}{\sqrt{n}}

Symbols used:

  • $n$ the sample size
  • $z$ the calculated z-statistic value

Rosenthal (1991) is the oldest reference I could find for this correlation coefficient. However, Cohen (1988, p. 275) actually has a measure 'f' that has the same equation.

Before, After and Alternatives

Before this effect size / correlation you might first want to perform a test. Any test that uses a z-value could be used for example: * ts_score_os for One-Sample Score Test * ts_wald_os for One-Sample Wald Test * ts_wilcoxon_os for Wilcoxon Signed Rank Test (One-Sample) with a normal approximation

After this you might want to use the rules-of-thumb for a Pearson Correlation or Cohen f: * th_pearson_r for rules of thumb for a Pearson correlation coefficient * th_cohen_f for rules of thumb for a Cohen f

References

Cohen, J. (1988). Statistical power analysis for the behavioral sciences (2nd ed.). L. Erlbaum Associates.

Rosenthal, R. (1991). Meta-analytic procedures for social research (Rev. ed). Sage Publications.

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

Examples

>>> z = 1.143943
>>> n = 20
>>> r_rosenthal(z, n)
0.25579343103850416
Expand source code
def r_rosenthal(zVal, n):
    '''
    Rosenthal Correlation Coefficient
    ---------------------------------
     
    This function will calculate Rosenthal Correlation Coefficient. A simple correlation coefficient that divides a z-score by the square root of the sample size.

    This function is shown in this [YouTube video](https://youtu.be/WTbsyIdWfGg) and the effect size is also described at [PeterStatistics.com](https://peterstatistics.com/Terms/Correlations/RosenthalCorrelationCoefficient.html)
    
    Parameters
    ----------
    zVal : float
        the z-value of test
    n : int
        the sample size
        
    Returns
    -------
    r : float
        the Rosenthal correlation coefficient value.
   
    Notes
    -----
    The formula used (Rosenthal, 1991, p. 19):
    $$r = \\frac{z}{\\sqrt{n}}$$
    
    *Symbols used:*
    
    * $n$ the sample size
    * $z$ the calculated z-statistic value
    
    Rosenthal (1991) is the oldest reference I could find for this correlation coefficient. However, Cohen (1988, p. 275) actually has a measure 'f' that has the same equation.
    
    Before, After and Alternatives
    ------------------------------
    Before this effect size / correlation you might first want to perform a test. Any test that uses a z-value could be used for example:
    * [ts_score_os](../tests/test_score_os.html#ts_score_os) for One-Sample Score Test
    * [ts_wald_os](../tests/test_wald_os.html#ts_wald_os) for One-Sample Wald Test
    * [ts_wilcoxon_os](../tests/test_wilcoxon_os.html#ts_wilcoxon_os) for Wilcoxon Signed Rank Test (One-Sample) with a normal approximation

    After this you might want to use the rules-of-thumb for a Pearson Correlation or Cohen f:
    * [th_pearson_r](../other/thumb_pearson_r.html#th_pearson_r) for rules of thumb for a Pearson correlation coefficient
    * [th_cohen_f](../other/thumb_cohen_f.html#th_cohen_f) for rules of thumb for a Cohen f
    
    References 
    ----------
    Cohen, J. (1988). *Statistical power analysis for the behavioral sciences* (2nd ed.). L. Erlbaum Associates.
    
    Rosenthal, R. (1991). *Meta-analytic procedures for social research* (Rev. ed). Sage Publications.
    
    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
    
    Examples
    --------
    >>> z = 1.143943
    >>> n = 20
    >>> r_rosenthal(z, n)
    0.25579343103850416
    
    '''
    
    r = abs(zVal / (n**0.5))
    
    return (r)