crossTab {rosetta} | R Documentation |
Cross tables
Description
This function produces a cross table, computes Chi Square, and computes the point estimate and confidence interval for Cramer's V.
Usage
crossTab(x, y = NULL, conf.level = 0.95, digits = 2, pValueDigits = 3, ...)
## S3 method for class 'crossTab'
print(x, digits = x$input$digits, pValueDigits = x$input$pValueDigits, ...)
## S3 method for class 'crossTab'
pander(x, digits = x$input$digits, pValueDigits = x$input$pValueDigits, ...)
Arguments
x |
Either a crosstable to analyse, or one of two vectors to use to generate that crosstable. The vector should be a factor, i.e. a categorical variable identified as such by the 'factor' class). |
y |
If x is a crosstable, y can (and should) be empty. If x is a vector, y must also be a vector. |
conf.level |
Level of confidence for the confidence interval. |
digits |
Minimum number of digits after the decimal point to show in the result. |
pValueDigits |
Minimum number of digits after the decimal point to show in the Chi Square p value in the result. |
... |
Extra arguments to |
Value
The results of ufs::confIntV()
, but also prints the cross
table and the chi square test results.
Examples
crossTab(infert$education, infert$induced, samples=50);