chisq.detail | R Documentation |
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.
chisq.detail(tab)
tab |
Matrix or table to be analyzed |
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.
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. |
Greg Snow, 538280@gmail.com
~put references to the literature/web site here ~ Moore, bps
chisq.test
,loglin
,
xtabs
, table
, prop.table
,
CrossTable
from the gmodels package.
chisq.detail(HairEyeColor[,,1])
chisq.detail(HairEyeColor[,,2])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.