Learn R Programming

miscor (version 0.1-0)

print.test.cor: Print cor.rhotest

Description

This function prints the test.cor object

Usage

"print"(x, ...)

Arguments

x
test.cor object.
...
further arguments passed to or from other methods.

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 $< \rho \le \lambda$ is preferable to H0: $\rho = $0. Psychology Science, 49, 74-87.

See Also

test.cor

Examples

Run this code
#--------------------------------------
# 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, rho = 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, rho = 0.4, output = FALSE)
print(obj)

Run the code above in your browser using DataLab