conf.cor: Product-moment correlation coefficient with confidence...

Description Usage Arguments Value Author(s) References See Also Examples

Description

This function computes the product-moment correlation coefficient with two-sided or one-sided confidence interval using Fisher's z tranformation.

Usage

1
2
3
conf.cor(x = NULL, y = NULL, r = NULL, n = NULL,
         alternative = c("two.sided", "less", "greater"),
         conf.level = 0.95, digits = 3, output = TRUE)

Arguments

x

a numeric vector.

y

a numeric vector.

r

alternative specification, product-moment correlation coefficient.

n

alternative specification, number of observations.

alternative

a character string describing the alternative hypothesis, must be one of "two.sided" (default), "greater" or "less".

conf.level

confidence level of the interval.

digits

integer indicating the number of decimal places to be displayed.

output

logical; if TRUE, output is shown.

Value

Returns an object of class conf.cor with following entries:

call function call
dat data.frame with x and y (if available)
spec specification of function arguments
res list with results, i.e., r (correlation coefficient), n, lower (lower limit of CI), upper (upper limit of CI)

Author(s)

Takuya Yanagida takuya.yanagida@univie.ac.at,

References

Rasch, D., Kubinger, K. D., & Yanagida, T. (2011). Statistics in psychology - Using R and SPSS. New York: John Wiley & Sons.

Kubinger, K. D., Rasch, D., & Simeckova, M. (2007). Testing a correlation coefficient's significance: Using H0: 0 < ρ ≤ λ is preferable to H0: ρ = 0. Psychology Science, 49, 74-87.

See Also

test.cor, seqtest.cor, comptest.cor

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
#--------------------------------------
# Two-sided 95% Confidence Interval
# r = 0.55, n = 120

conf.cor(r = 0.55, n = 120)

#--------------------------------------
# One-sided 99% Confidence Interval

# Generate random data
dat <- sim.cor(100, rho = 0.4)

conf.cor(dat$x, dat$y, conf.level = 0.99, alternative = "less")

miscor documentation built on May 1, 2019, 10:14 p.m.

Related to conf.cor in miscor...