powered by
Prints a 2-way contingency table along with percentages, marginal, and conditional distributions.
table2d_summary(object, margins = TRUE, percentages = FALSE, conditionals = c("none", "row", "column"), chisq.test = TRUE, …)
a \(r \times c\)-contingency table
if TRUE, marginal distributions are computed.
TRUE
if TRUE, relative frequencies are computed.
if not "none", the conditional distributions, given the row/column factor, are computed.
"none"
if TRUE, a chi-squared test of independence is carried out.
currently not used.
Returns invisibly a \(r \times c \times k\) table, \(k\) depending on the amount of choices (at most 3).
mar_table, prop.table, independence_table
mar_table
prop.table
independence_table
# NOT RUN { data("UCBAdmissions") table2d_summary(margin.table(UCBAdmissions, 1:2)) # }
Run the code above in your browser using DataLab