Local.Odds.Ratio: Given an input matrix, we can split it into smaller...

Description Usage Arguments Details Value References See Also Examples

View source: R/601.Local-odds-ratio.R

Description

Given an input matrix, we can split it into smaller sub-matrix (min 2x2) and then find the Chi-squared test for each sub-matrix. The smaller matrix can "support" or "oppose" (have a different conclusion at 95 test value of the full input matrix. We count the number of times each cell supports or opposes the overall Chi-squared test. We also generate the possible list of sub-matrix.

Usage

1

Arguments

mat

- matrix for which the sub-matrix is to be generated

Details

This can be used as an outlier detection method as well as observing the individual cells within an IxJ table

Value

A of dataframes with

Hot.df

Dataframe with the difference between the supporting matrix and the opposing matrix

Suport.df

Dataframe of the cell counts for support of table level Chi-sqaured

Oppose.df

Dataframe of the cell counts for opposing of table level Chi-sqaured

sub-matrix

list of sub-matrix - this is returned only if the details flag is set to TRUE

References

[1] Mosteller F, Parunak A (2006) Identifying extreme cells in a sizable contingency table: Probabilistic and exploratory approaches. In: Hoaglin DC, Mosteller F, Tukey JW (eds) Exploring Data Tables, Trends, and Shapes, John Wiley & Sons, pp 189-224

See Also

Other IxJ Inference methods: Nominal.Odds.Ratio, Plot.heatmap, Reversal.point, Subtable.Odds.Ratio, generate.heatmap.matrix

Examples

1
2
3
4
5
6
7
##  Example data from [reference 1]
Drills=c(2,	10,	4,	2 )
Pots= c(3,	8,	4,	6)
Grinding.Stones=c( 13, 5, 3, 9)
Point.Fragments=c(20, 36, 19, 20)
mat=rbind(Drills,Pots,Grinding.Stones,Point.Fragments)
Local.Odds.Ratio(mat)

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