test.cor {statpsych}R Documentation

Hypothesis test for a Pearson or partial correlation

Description

Computes a t test for a test of the null hypothesis that a population Pearson or partial correlations is equal to 0, or a z test using a Fisher transformation for a test of the null hypothesis that a Pearson or partial correlation is equal to some specified nonzero value. Set s = 0 for a Pearson correlation. The hypothesis testing results should be accompanied with a confidence interval for the population Pearson or partial correlation value.

Usage

test.cor(cor, n, s, h)

Arguments

cor

estimated correlation

n

sample size

s

number of control variables

h

null hypothesis value of correlation

Value

Returns a 1-row matrix. The columns are:

See Also

ci.cor

Examples

test.cor(.484, 100, 0, .2)

# Should return:
# Estimate        z           p
#    0.484 3.205432 0.001348601


test.cor(.372, 100, 0, 0)

# Should return:
#  Estimate        t df           p
#     0.372 3.967337 98 0.000138436



[Package statpsych version 1.6.0 Index]