Learn R Programming

psychmeta (version 2.7.0)

var_error_mult_R: Estimate the error variance of linear regression multiple R(-squared)

Description

This function estimates the error variance for linear regression model (squared) multiple correlations (\(R\) and \(R^{2}\)).

Usage

var_error_mult_R(R, n, p)

var_error_mult_Rsq(Rsq, n, p)

var_error_R(R, n, p)

var_error_Rsq(Rsq, n, p)

Value

A vector of sampling-error variances.

Arguments

R

Vector of multiple correlation coefficients.

n

Vector of sample sizes.

p

Vector of numbers of predictors in the model.

Rsq

Vector of squared multiple correlation coefficients.

Details

The sampling variance of a multiple correlation is approximately:

$$var_{e}=\frac{(1-R^{2})^{2}(n-p-1)^{2}}{(n^{2}-1)(n+3)}$$

The sampling variance of a squared multiple correlation is approximately:

$$var_{e}=\frac{4R^{2}(1-R^{2})^{2}(n-p-1)^{2}}{(n^{2}-1)(n+3)}$$

References

Cohen, J., Cohen, P., West, S. G., & Aiken, L. S. (2003). Applied multiple regression/correlation analysis for the behavioral sciences (3rd ed.). Lawrence Erlbaum and Associates. tools:::Rd_expr_doi("10.4324/9780203774441"). p. 88.

Olkin, I., & Finn, J. D. (1995). Correlations redux. Psychological Bulletin, 118(1), 155–164. tools:::Rd_expr_doi("10.1037/0033-2909.118.1.155")

Examples

Run this code
var_error_mult_R(R = .5, n = 30, p = 4)
var_error_mult_R(R = .5, n = 30, p = 4)
var_error_mult_Rsq(Rsq = .25, n = 30, p = 4)
var_error_mult_Rsq(Rsq = .25, n = 30, p = 4)

Run the code above in your browser using DataLab