Description Usage Arguments Value Note Examples
Creates a "random" contingency table of size ncol
times nrow
which has a total number of
n
observations. For n
a range can be given; if a single value is given than the range
round(n*0.8)
till round(n*1.2)
is used. With digits
the number of digits after the
comma for the expected frequencies can be given.
With the following parameter(s) a target range of association can be given for the contingency table
CC
target range for the corrected contingency coefficient
V
target range for Cramer's V
C
target range for the contingency coefficient
chisq
target range for the chi square value
For any parameter (except chisq
) given as a single value the range is computed as parameter plus/minus 0.05.
If chisq
) is given as a single value the range is computed as parameter
plus/minus √{(ncol-1)(nrow-1)}).
If more than one target parameter is given then a join of the corresponding chi square ranges will be made.
1 | contingencyTable(tab)
|
tab |
a contingency table |
a contingency table of observed frequencies
It is not guaranteed that for all parameters combinations a solution can be found. The function stops
after one thousand iterations to find an appropriate table of expected or observed frequencies with an error!
You may increase/enlarge the range of n
, cc
or increase digits
.
1 | ct <- contingencyTable(HairEyeColor[,,"Female"])
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.