crosstab {tidycomm} | R Documentation |
Crosstab variables
Description
Computes contingency table for one independent (column) variable and one or more dependent (row) variables.
Usage
crosstab(
data,
col_var,
...,
add_total = FALSE,
percentages = FALSE,
chi_square = FALSE
)
Arguments
data |
|
col_var |
Independent (column) variable. |
... |
Dependent (row) variables. |
add_total |
Logical indicating whether a 'Total' column should be
computed. Defaults to |
percentages |
Logical indicating whether to output column-wise
percentages instead of absolute values. Defaults to |
chi_square |
Logical indicating whether a Chi-square test should be computed.
Test results will be reported via message(). Defaults to |
Value
a tdcmm model
See Also
Other categorical:
tab_frequencies()
Examples
WoJ %>% crosstab(reach, employment)
WoJ %>% crosstab(reach, employment, add_total = TRUE, percentages = TRUE, chi_square = TRUE)
[Package tidycomm version 0.4.1 Index]