library(catcorr)
This package contains the catCorr
function, which allows users to construct
scalars and matrices based off of two statistics: Cramer's V statistic, and
Tschuprow's T statistic. The p-value associated with Cramer's V (related to the
$\chi^2$ statistic) is also output.
First, some data:
set.seed(1234) n <- 30 w <- rep(c('D', 'E', 'D'), each = 10) x <- sample(c('A', 'B'), n, replace = TRUE) y <- sample(c('A', 'B', 'C'), n, replace = TRUE) z <- c(rep('D', 15), rep('E', 15)) df <- data.frame(w, x, y, z)
The catCorr
function has two implementations via inputting either a
data.frame
or two vectors.
catCorr(x, y) catCorr(df)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.