The Pearson correlation coefficient

Described in Chapter 7 "The rxc Table"

Pearson_correlation_coefficient_rxc(
  n,
  a = seq_len(nrow(n)),
  b = seq_len(ncol(n)),
  alpha = 0.05
)

Arguments

n

the observed table (an rxc matrix)

a

scores assigned to the rows

b

scores assigned to the columns

alpha

the nominal significance level, used to compute a 100(1-alpha) confidence interval

Value

An object of the contingencytables_result class, basically a subclass of base::list(). Use the utils::str() function to see the specific elements returned.

Examples

  Pearson_correlation_coefficient_rxc(table_7.7)
#> The Pearson correlation coefficient: r = -0.1020 (95% CI -0.1708 to -0.0322)
  Pearson_correlation_coefficient_rxc(table_7.8)
#> The Pearson correlation coefficient: r =  0.5710 (95% CI  0.4439 to  0.6756)
  Pearson_correlation_coefficient_rxc(table_7.9)
#> The Pearson correlation coefficient: r =  0.3183 (95% CI  0.2815 to  0.3542)