| tabi | R Documentation |
Creates an immediate contingency table from typed counts. The immediate mode
uses the same calculation engine as the corresponding R4VN analyses when values are supplied
directly, for example tab(sex, outcome, data = dat, chi = TRUE).
tabi(
...,
row.names = NULL,
col.names = NULL,
percent = c("none", "row", "col", "total"),
row = FALSE,
col = FALSE,
cell = FALSE,
total = FALSE,
exp = FALSE,
chi = TRUE,
fisher = FALSE,
lr = FALSE,
residual = FALSE,
adjresidual = FALSE,
correct = FALSE,
digits = 1,
p_digits = 3,
workspace = 2e+05,
show = TRUE,
console = FALSE
)
... |
Numeric row vectors, a matrix, or a table. For |
row.names, col.names |
Optional row and column labels. |
percent |
Percentage denominator: |
row, col, cell, total |
Logical shortcuts for row, column, or total-cell
percentages. Only one may be |
exp |
Show expected counts. |
chi |
Show Pearson's chi-squared test. |
fisher |
Show Fisher's exact test. |
lr |
Show the likelihood-ratio chi-squared test. |
residual |
Show Pearson residuals. |
adjresidual |
Show adjusted residuals. |
correct |
Apply Yates's correction for a 2 by 2 Pearson test. |
digits |
Number of decimal places for estimates. |
p_digits |
Number of decimal places for p-values. |
workspace |
Workspace passed to |
show |
Logical; open the formatted result in the Viewer. Default |
console |
Logical; also print the traditional text result in the Console. Default |
Invisibly returns an object of class r4vn_stat.
tabi(c(2, 3), c(5, 6), c(8, 9), row = TRUE,
exp = TRUE, chi = TRUE, fisher = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.