Description Usage Arguments Value Author(s) References See Also Examples
This function computes the product-moment correlation coefficient with two-sided or one-sided confidence interval using Fisher's z tranformation.
1 2 3 |
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 |
conf.level |
confidence level of the interval. |
digits |
integer indicating the number of decimal places to be displayed. |
output |
logical; if |
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) |
Takuya Yanagida takuya.yanagida@univie.ac.at,
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.
test.cor
, seqtest.cor
, comptest.cor
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")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.