rStats.js v1.3.0
    Preparing search index...

    Function cohensD

    • Cohen's d: the standardized difference of means of two samples (pooled or averaged standard deviation), of paired samples, or of one sample against mu, with a confidence interval from the noncentral t distribution. Equivalent to effectsize::cohens_d() in R.

      As effectsize, warnings has "'y' is numeric but has only 2 unique values. ..." where y has exactly 2 distinct values (a grouping variable is given as two samples here) and "Missing values detected. NAs dropped." for NaN.

      Parameters

      Returns CohensDResult

      cohensD([5.1, 4.9, 6.2, 5.8], [4.1, 4.5, 3.9, 5.0]).value; // 2.049693834034246