test.cor2: Hypothesis test for a 2-group Pearson or partial correlation...

View source: R/statpsych2.R

test.cor2R Documentation

Hypothesis test for a 2-group Pearson or partial correlation difference

Description

Computes a z test for a difference of population Pearson or partial correlations in a 2-group design. Set s = 0 for a Pearson correlation. The hypothesis testing results should be accompanied with a confidence interval for the difference in population correlation values.

Usage

test.cor2(cor1, cor2, n1, n2, s)

Arguments

cor1

estimated correlation for group 1

cor2

estimated correlation for group 2

n1

sample size for group 1

n2

sample size for group 2

s

number of control variables

Value

Returns a 1-row matrix. The columns are:

  • Estimate - estimate of correlation difference

  • z - z test statistic

  • p - two-sided p-value

See Also

ci.cor2

Examples

test.cor2(.684, .437, 100, 125, 0)

# Should return:
# Estimate        z           p
#    0.247 2.705709 0.006815877



statpsych documentation built on Sept. 11, 2024, 7:42 p.m.