MathPHP\Statistics\EffectSize::cohensQ PHP Метод

cohensQ() публичный статический Метод

The difference between two Fisher transformed Pearson regression coefficients. hhttps://en.wikipedia.org/wiki/Effect_size#Cohen.27s_q 1 1 + r₁ 1 1 + r₂ q = - log ------ - - log ------ 2 1 - r₁ 2 1 - r₂ where r₁ and r₂ are the regressions being compared
public static cohensQ ( number $r₁, number $r₂ ) : number
$r₁ number
$r₂ number
Результат number
    public static function cohensQ($r₁, $r₂)
    {
        if ($r₁ >= 1 || $r₂ >= 1) {
            throw new Exception\OutOfBoundsException('r must be greater than or equal to 1');
        }
        $½ = 0.5;
        return abs($½ * log((1 + $r₁) / (1 - $r₁)) - $½ * log((1 + $r₂) / (1 - $r₂)));
    }