Description Usage Arguments Details Value References See Also Examples
View source: R/702.Partition.R
A partitioning may show that an association reflects primarily differences between certain categories or groupings of categories. In case of IxJ table, independent chi-squared components result from comparing columns 1 and 2 and then combining them and comparing them to column 3, and so on. This generates (I-1)(J-1) unique partioned tables for a given IxJ input. The Chi-squared and G-sqaured test for each partition is calculated. Comparision of overall Chi-sqaured and G-squared value is done with the sumation of the Chi-squared and G-sqaured values of the partioned tables
1 | Partition.table(mat, details = FALSE)
|
mat |
- matrix for which the sub-matrix is to be generated |
details |
- If this is set to TRUE, the the return value includes the full list of partioned tables with its Chi-sqaured and G-squared values |
A partitioning may show that an association reflects primarily differences between certain categories or groupings of categories. This is based on 2 x 2 tables so that df will be 1 for each table. In total we generate (I-1)(J-1) tables so that total df = (I-1)(J-1) which is df of original table
A list of dataframes with
Chisq.compare |
Dataframe with the difference between the supporting matrix and the opposing matrix |
Gsq.compare |
Dataframe of the cell counts for support of table level Chi-sqaured |
Partitioning.df |
Dataframe of partioned tables with its Chi-squared and G-squared values - this is returned only if the details flag is set to TRUE |
[1] Alan Agresti Categorical Data Analysis, 2nd Edition John Wiley & Sons
Other Test methods: Proportion.diagnostic.test
,
exact2x2tests.hypergeom
,
exact2x2tests.regular
1 2 3 | ## Example - Agresti CDA 2002 p82 Section 3.3.3 - Example 3.3.4 is illustrated here.
mat=matrix(c(90,12,78,13,1,6,19,13,50),3,3,byrow = TRUE)
Partition.table(mat,details=FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.