Usage
contTables(data, rows, cols, counts = NULL, layers = list(), chiSq = TRUE, chiSqCorr = FALSE, likeRat = FALSE, contCoef = FALSE, phiCra = FALSE, logOdds = FALSE, ciWidth = 95, gamma = FALSE, taub = FALSE, exp = FALSE, pcRow = FALSE, pcCol = FALSE, pcTot = FALSE)
Arguments
data
the data as a data frame
rows
a string naming the variable to use as the rows in the
contingency table
cols
a string naming the variable to use as the columns in the
contingency table
counts
a string naming the variable to use as counts, or NULL if
each row represents a single observation
layers
a character vector naming variables to split the contingency
table across
chiSq
TRUE
(default) or FALSE
, provide chi²
chiSqCorr
TRUE
or FALSE
(default), provide chi² with
continuity correction
likeRat
TRUE
or FALSE
(default), provide the
likelihood ratio
contCoef
TRUE
or FALSE
(default), provide the
contingency coefficient
phiCra
TRUE
or FALSE
(default), provide Phi and
Cramer's V
logOdds
TRUE
or FALSE
(default), provide the log odds
ratio (only available for 2x2 tables)
ciWidth
a number between 50 and 99.9 (default: 95), width of the
confidence intervals to provide
gamma
TRUE
or FALSE
(default), provide gamma
taub
TRUE
or FALSE
(default), provide Kendall's tau-b
exp
TRUE
or FALSE
(default), provide the expected
counts
pcRow
TRUE
or FALSE
(default), provide row percentages
pcCol
TRUE
or FALSE
(default), provide column
percentages
pcTot
TRUE
or FALSE
(default), provide total
percentages