umx_r_test: Test the difference between correlations for significance.

umx_r_testR Documentation

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

Three or 4 variables forming the two pairs of columns.

alternative

A two (default) or one-sided (greater less) test.

Details

Non-overlapping (no variable in common) correlations in the same dataset. If 4 variables are provided in vars, umx_r_test conducts a test of the correlation of var 1 & 2 differs in magnitude from the correlation of var 3 with var 4. (r.jk and r.hm in cocor speak).

Overlapping (1 variable in common) correlations in the same dataset. If 3 variables are provided in vars, umx_r_test conducts a test of whether the correlation of var 1 & 2 differs in magnitude from the correlation of var 1 with var 3. (r.jk and r.jh in cocor speak).

In the future it will be expanded to handle other correlations, and to take correlations as input.

Value

cocor result.

See Also

Other Miscellaneous Stats Functions: FishersMethod(), SE_from_p(), geometric_mean(), harmonic_mean(), oddsratio(), reliability(), umxCov2cor(), umxHetCor(), umxParan(), umxWeightedAIC(), umx_apply(), umx_cor(), umx_means(), umx_round(), umx_scale(), umx_var(), umx

Examples

# 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)
umx_r_test(mtcars, c("mpg", "disp", "hp"))

tbates/umx documentation built on March 16, 2024, 4:26 a.m.