Prints out the details of the computations involved in a chi-squared
test on a table. Includes the expected values and the chi-squared
contribution of each cell.
Usage
chisq.detail(tab)
Arguments
tab
Matrix or table to be analyzed
Value
This function is used primarily for its side effect of printing the
results, but does return invisibly a list with the following components:
obs
A matrix of the observed values, same as tab.
expected
A matrix of the expected values under the null hypothesis.
chi.table
A matrix of the chi-squared contributions of each
cell.
chi2
The chi-squared test statistic.
Details
This function prints out the input table along with the expected value
for each cell under the null hypothesis. It also prints out the
chi-squared contribution of each cell in the same pattern as the
table. This shows the computations involved and one rule of thumb is
to look for these values that are greater than 4 as a post-hoc analysis.
References
~put references to the literature/web site here ~ Moore, bps