compare_independent_rs {kim}R Documentation

Compare independent correlations

Description

Compares whether two correlations from two independent samples are significantly different each other. See Field et al. (2012, ISBN: 978-1-4462-0045-2).

Usage

compare_independent_rs(
  r1 = NULL,
  n1 = NULL,
  r2 = NULL,
  n2 = NULL,
  one_tailed = FALSE,
  round_p = 3,
  round_z_diff = 2,
  round_r = 2,
  print_summary = TRUE,
  output_type = NULL
)

Arguments

r1

correlation in the first sample

n1

size of the first sample

r2

correlation in the second sample

n2

size of the first sample

one_tailed

logical. Should the p value based on a one-tailed t-test? (default = FALSE)

round_p

(only for displaying purposes) number of decimal places to which to round the p-value (default = 3)

round_z_diff

(only for displaying purposes) number of decimal places to which to round the z-score (default = 2)

round_r

(only for displaying purposes) number of decimal places to which to round correlation coefficients (default = 2)

print_summary

logical. Should the summary be printed? (default = TRUE)

output_type

type of the output. If output_type = "z", the function's output will be the z-score of the difference between the two correlations. If output_type = "p", the function's output will be the p-value associated with the z-score of the difference between the two correlations. By default, output_type = NULL, and the function will not return any value other than the printed summary.

Value

the output will be the results of a test comparing two independent correlations.

Examples

compare_independent_rs(r1 = .1, n1 = 100, r2 = .2, n2 = 200)
compare_independent_rs(
r1 = .1, n1 = 100, r2 = .2, n2 = 200, one_tailed = TRUE)
compare_independent_rs(r1 = .506, n1 = 52, r2 = .381, n2 = 51)

[Package kim version 0.5.422 Index]