Compares whether two dependent correlations from the same sample are significantly different each other.
compare_dependent_rs(
data = NULL,
var_1_name = NULL,
var_2_name = NULL,
var_3_name = NULL,
one_tailed = FALSE,
round_r = 3,
round_p = 3,
round_t = 2,
print_summary = TRUE,
return_dt = FALSE
)
the output will be a summary of the test comparing two dependent correlations
a data object (a data frame or a data.table)
name of the variable whose correlations with two other variables will be compared.
name of the first of the two variables whose
correlations with var_1_name
will be compared.
name of the second of the two variables whose
correlations with var_1_name
will be compared.
logical. Should the p value based on a one-tailed t-test? (default = FALSE)
number of decimal places to which to round correlation coefficients (default = 2)
number of decimal places to which to round p-values (default = 3)
number of decimal places to which to round the t-statistic (default = 2)
logical. Should the summary be printed? (default = TRUE)
logical. Should the function return a summary table as an output, as opposed to returning the output through the "invisible" function? (default = FALSE)
Suppose that Variables A, B, and C are measured from a group of subjects. This function tests whether A is related to B differently than to C. Put differently, this function tests H0: r(A, B) = r(A, C)
For more information on formulas used in this function, please refer to Steiger (1980) doi:10.1037/0033-2909.87.2.245 and Chen & Popovich (2002) doi:10.4135/9781412983808
compare_dependent_rs(
data = mtcars, var_1_name = "mpg", var_2_name = "hp", var_3_name = "wt")
Run the code above in your browser using DataLab