umx_r_test: Test the difference between correlations for significance.
Description
umx_r_test is a wrapper around the cocor test of difference between correlations.
Usage
umx_r_test(
data = NULL,
vars = vars,
alternative = c("two.sided", "greater", "less")
)
Arguments
data
The dataset.
vars
Four variables forming the two pairs of columns: "j & k" and "h & m".
alternative
A two (default) or one-sided (greater less) test.
Value
cocor result.
Details
Currently umx_r_test handles the test of whether r.jk and r.hm differ in magnitude.
i.e, two non-overlapping (no variable in common) correlations in the same dataset.
In the future it will be expanded to handle overlapping correlations, and to take correlation matrices as input.
# NOT RUN {# Is the correlation of mpg with cylinder count different from that # obtaining between disp and hp?vars = c("mpg", "cyl", "disp", "hp")
umx_r_test(mtcars, vars)
# }