ci.spcor: Confidence interval for a semipartial correlation

View source: R/statpsych2.R

ci.spcorR Documentation

Confidence interval for a semipartial correlation

Description

Computes a Fisher confidence interval for a population semipartial correlation. This function requires an (unadjusted) estimate of the squared multiple correlation in the full model that contains the predictor variable of interest plus all control variables. This function computes a modified Aloe-Becker confidence interval that uses n - 3 rather than n in the standard error and also uses a Fisher transformation of the semipartial correlation.

Usage

ci.spcor(alpha, cor, r2, n)

Arguments

alpha

alpha level for 1-alpha confidence

cor

estimated semipartial correlation

r2

estimated squared multiple correlation in full model

n

sample size

Value

Returns a 1-row matrix. The columns are:

  • Estimate - estimated semipartial correlation

  • SE - standard error

  • LL - lower limit of the confidence interval

  • UL - upper limit of the confidence interval

References

\insertRef

Aloe2012statpsych

Examples

ci.spcor(.05, .582, .699, 20)

# Should return:
#      Estimate        SE        LL        UL
# [1,]    0.582 0.1374298 0.2525662 0.7905182
 


statpsych documentation built on July 9, 2023, 6:50 p.m.