Learn R Programming

psychmeta (version 2.3.4)

var_error_d: Estimate the error variance Cohen's d values

Description

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).

Usage

var_error_d(d, n1, n2 = NA, correct_bias = TRUE)

Arguments

d

Vector of Cohen's d values.

n1

Vector of sample sizes from group 1 (or the total sample size with the assumption that groups are of equal size, if no group 2 sample size is supplied).

n2

Vector of sample sizes from group 2.

correct_bias

Logical argument that determines whether to correct error-variance estimates for small-sample bias in d values (TRUE) or not (FALSE).

Value

A vector of sampling-error variances.

Details

The sampling variance of a d value is:

$$\left(\frac{n-1}{n-3}\right)\left(\frac{n_{1}+n_{2}}{n_{1}n_{2}}+\frac{d^{2}}{2(n_{1}+n_{2})}\right)$$

When groups 1 and 2 are of equal size, this reduces to

$$var_{e}=\left(\frac{n-1}{n-3}\right)\left(\frac{4}{n}\right)\left(1+\frac{d^{2}}{8}\right)$$

This can be corrected for bias by first correcting the d value (see correct_d_bias) prior to estimating the error variance.

References

Schmidt, F. L., & Hunter, J. E. (2015). Methods of meta-analysis: Correcting error and bias in research findings (3rd ed.). Thousand Oaks, CA: Sage. https://doi.org/10/b6mg. pp. 292<U+2013>295.

Examples

Run this code
# NOT RUN {
var_error_d(d = 1, n1 = 30, n2 = 30, correct_bias = TRUE)
var_error_d(d = 1, n1 = 60, n2 = NA, correct_bias = TRUE)
# }

Run the code above in your browser using DataLab