Description Usage Arguments Author(s) References See Also Examples
This function prints the test.cor
object
1 2 |
x |
|
... |
further arguments passed to or from other methods. |
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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | #--------------------------------------
# Two-sided test
# H0: rho == 0, H1: rho != 0
# r = 0.23, n = 60
obj <- test.cor(r = 0.23, n = 120, output = FALSE)
print(obj)
#--------------------------------------
# Two-sided test
# H0: rho == 0.4, H1: rho != 0.4
# r = 0.55, n = 120
obj <- test.cor(r = 0.55, n = 120, rho0 = 0.4,
output = FALSE)
print(obj)
#--------------------------------------
# One-sided test
# H0: rho <= 0.4, H1: rho > 0.4
# Generate random data
dat <- sim.cor(100, rho = 0.4)
obj <- test.cor(dat$x, dat$y, rho0 = 0.4, output = FALSE)
print(obj)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.