Learn R Programming

vcmeta (version 1.5.0)

meta.sub.cor: Confidence interval for a subgroup difference in average Pearson or partial correlations

Description

Computes the estimate, standard error, and confidence interval for a difference in average Pearson or partial correlations for two mutually exclusive subgroups of studies. Each subgroup can have one or more studies. All of the correlations must be either Pearson correlations or partial correlations.

Usage

meta.sub.cor(alpha, n, cor, s, group)

Value

Returns a matrix with three rows:

  • Row 1 - estimate for Set A

  • Row 2 - estimate for Set B

  • Row 3 - estimate for difference, Set A - Set B

The columns are:

  • Estimate - estimated average correlation or difference

  • SE - standard error

  • LL - lower limit of the confidence interval

  • UL - upper limit of the confidence interval

Arguments

alpha

alpha level for 1-alpha confidence

n

vector of sample sizes

cor

vector of estimated correlations

s

number of control variables (set to 0 for Pearson)

group

vector of group indicators:

  • 1 for set A

  • 2 for set B

  • 0 to ignore

References

Bonett2008avcmeta

Examples

Run this code
n <- c(55, 190, 65, 35)
cor <- c(.40, .65, .60, .45)
group <- c(1, 1, 2, 0)
meta.sub.cor(.05, n, cor, 0, group)

# Should return:
#                Estimate         SE         LL        UL
# Set A:            0.525 0.06195298  0.3932082 0.6356531
# Set B:            0.600 0.08128008  0.4171458 0.7361686
# Set A - Set B:   -0.075 0.10219894 -0.2645019 0.1387283


Run the code above in your browser using DataLab