Allows for error variance to be estimated using total sample size of both groups being compared (in this case, supply sample sizes using only the n1 argument) or
using separate sample sizes for group 1 and group 2 (i.e., the groups being compared; in this case, supply sample sizes using both the n1 and n2 arguments).
The sampling variance of a d value is:
(n-1n-3)(n_1+n_2n_1n_2+d^22(n_1+n_2))var_e = ((n - 1) / (n - 3)) * ((n1 + n2) / (n1 * n2) + d^2 / (2 * (n1 + n2)))
When groups 1 and 2 are of equal size, this reduces to
var_e=(n-1n-3)(4n)(1+d^28)var_e = ((n - 1) / (n - 3)) * (4 / n) * (1 + d^2 / 8)
This can be corrected for bias by first correcting the d value (see correct_d_bias()
) prior to estimating the error variance.