powered by
Computes contingency table for one independent (column) variable and one or more dependent (row) variables.
crosstab( data, col_var, ..., add_total = FALSE, percentages = FALSE, chi_square = FALSE )
a tdcmm model
a tibble or a tdcmm model
Independent (column) variable.
Dependent (row) variables.
Logical indicating whether a 'Total' column should be computed. Defaults to FALSE.
FALSE
Logical indicating whether to output column-wise percentages instead of absolute values. Defaults to FALSE.
Logical indicating whether a Chi-square test should be computed. Test results will be reported via message(). Defaults to FALSE.
Other categorical: tab_frequencies()
tab_frequencies()
WoJ %>% crosstab(reach, employment) WoJ %>% crosstab(reach, employment, add_total = TRUE, percentages = TRUE, chi_square = TRUE)
Run the code above in your browser using DataLab