print.comptest.cor: Print comptest.cor

Description Usage Arguments Author(s) References See Also Examples

Description

This function prints the comptest.cor object

Usage

1
2
## S3 method for class 'comptest.cor'
print(x, ...)

Arguments

x

comptest.cor object.

...

further arguments passed to or from other methods.

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.

Zou, G. Y. (2007). Toward using confidence intervals to compare correlation. Psychological Methods, 12, 399-413.

See Also

comptest.cor

Examples

 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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#--------------------------------------
# Dependent samples

# Generate random data
x <- c(3, 2, 2, 3, 7, 8, 5, 9)
y <- c(2, 4, 1, 5, 7, 3, 6, 7)
z <- c(1, 4, 3, 3, 1, 4, 2, 5)

#............................................
# H0: rho.xy == rho.xz,  H1: rho.xy != rho.xz

obj <- comptest.cor(x, y, z, output = FALSE)
print(obj)

#...........................................
# H0: rho.xy <= rho.xz,  H1: rho.xy > rho.xz
# r.xy = 0.44, r.xz = 0.21. r.yz = 0.20, n = 120

obj <- comptest.cor(r.xy = 0.44, r.xz = 0.21, r.yz = 0.20, n = 120,
                    alternative = "greater", output = FALSE)
print(obj)

#--------------------------------------
# Independent samples

# Generate random data
dat <- data.frame(group = rep(1:2, each = 200),
                  rbind(sim.cor(200, rho = 0.3),
                        sim.cor(200, rho = 0.5)))

#.......................................
# H0: rho.1 == rho.2, H1: rho.1 != rho.2

obj <- comptest.cor(x = dat$x, y = dat$y, group = dat$group,
                    output = FALSE)
print(obj)

#........................................
# H0: rho.1 >= rho.2, H1: rho.1 ! < rho.2
# Group 1: r = 0.32, n = 108
# Group 2: r = 0.56, n = 113

obj <- comptest.cor(r.1 = 0.32, n.1 = 108, r.2 = 0.56, n.2 = 113,
                    alternative = "less", output = FALSE)
print(obj)

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