fisher_corr: Generate a correlation matrix and confidence intervals

Description Usage Arguments Value Methods (by generic) Examples

View source: R/correlation_matrices.R

Description

Treatment of NAs is incomplete at this time (in particular, the degrees of freedom will not be correct).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
fisher_corr(x, y, conf.level = 0.95, ..., method = "fisher")

## S3 method for class 'AMcorr'
print(
  x,
  cor_fmt = "%.2f",
  sep = " ",
  include_ci = FALSE,
  include_pstar = FALSE,
  pstar_levels = c(`*` = 0.05, `**` = 0.01),
  ...
)

Arguments

x

AMcorr

y

numeric matrix-like object. If missing y=x.

conf.level

numeric confidence level

...

ignored

method

inference method, currently only 'fisher' is supported

cor_fmt

an sprintf format string for correlation

sep

separators between correlation and confidence intervals, and/or pvalues

include_ci

include upper/lower CI?

include_pstar

include pvalue asterix (set according to pstar_levels)

pstar_levels

named numeric vector determining pvalue formatting

Value

structure containing correlation matrix, lr, ur lower and upper CI, the pvalues from the associated tests pz and the degrees of freedom dof.

character matrix

Methods (by generic)

Examples

1
2
3
4
5
data(iris)
fc = fisher_corr(iris[, c('Sepal.Length', 'Sepal.Width')],
iris[, c('Petal.Length', 'Petal.Width')])
print(fc, include_pstar = TRUE)
print(fc, include_pstar = TRUE, include_ci = TRUE, cor_fmt = '%.1f')

amcdavid/AMmisc documentation built on June 1, 2020, 11:04 a.m.