Learn R Programming

orchaRd (version 2.2.1)

cor_diff: Correlation Difference

Description

Computes the difference in correlation coefficients between two groups along with associated sampling variance for meta-analysis. The correlation and associated sample size or the data frame of the two variables can be provided

Usage

cor_diff(cor1 = NULL, cor2 = NULL, n1 = NULL, n2 = NULL, x1 = NULL, x2 = NULL)

Value

A data frame with the difference in correlations and the sampling variances of the difference.

Arguments

cor1

Numeric, the correlation coefficient for group 1.

cor2

Numeric, the correlation coefficient for group 2.

n1

Integer, the sample size for group 1.

n2

Integer, the sample size for group 2.

x1

A numeric vector for group 1.

x2

A numeric vector for group 2.

Examples

Run this code
# \donttest{
set.seed(982)
# Example with known correlations
cor_diff(0.5, 0.3, 100, 100)
cor_diff(0.2, 0.4, 40, 40)
# }

Run the code above in your browser using DataLab