Partition.table: A partitioning may show that an association reflects...

Description Usage Arguments Details Value References See Also Examples

View source: R/702.Partition.R

Description

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

Usage

1
Partition.table(mat, details = FALSE)

Arguments

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

Details

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

Value

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

References

[1] Alan Agresti Categorical Data Analysis, 2nd Edition John Wiley & Sons

See Also

Other Test methods: Proportion.diagnostic.test, exact2x2tests.hypergeom, exact2x2tests.regular

Examples

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)

RajeswaranV/vcdPlus documentation built on May 27, 2019, 7:28 a.m.