var_error_r: Estimate the error variance of correlations

View source: R/var_error.R

var_error_rR Documentation

Estimate the error variance of correlations

Description

Estimates the error variance of Pearson correlations (r).

Usage

var_error_r(r, n, correct_bias = TRUE)

Arguments

r

Vector of correlations.

n

Vector of sample sizes.

correct_bias

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

Details

The sampling variance of a Pearson correlation is approximately:

var_e = (1 - r^2)^2 / (n - 1)

This can be corrected for bias in the sample correlation by first correcting the correlation (see correct_r_bias()) prior to estimating the error variance.

Value

A vector of sampling-error variances.

References

Schmidt, F. L., & Hunter, J. E. (2015). Methods of meta-analysis: Correcting error and bias in research findings (3rd ed.). Sage. doi: 10.4135/9781483398105. p. 99.

Examples

var_error_r(r = .3, n = 30, correct_bias = TRUE)
var_error_r(r = .3, n = 30, correct_bias = FALSE)

psychmeta documentation built on Aug. 26, 2022, 5:14 p.m.