Subtable.Odds.Ratio: Given an input matrix, we can split it into smaller 2x2...

Description Usage Arguments Details Value References See Also Examples

View source: R/602.Subtable-odds-ratio.R

Description

Given an input matrix, we can split it into smaller 2x2 sub-matrix and then find the Odds Ratio for each sub-matrix (subtable).

Usage

1

Arguments

mat

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

Details

The function calculates the odds ratio for every 2x2 sub-matrix for the input matrix. This can be used as input to models. If any of the cells a,b,c or d is zero, a continuity correction of 0.5 is added to all the cells and the odds ratio is calculated.

Value

A of dataframes with

Odds.Ratio

Odds Ratio of the 2x2 subtable

a

The value of a taken from the input table

b

The value of b taken from the input table

c

The value of c taken from the input table

d

The value of d taken from the input table

Index1RC

Index reference from the input matrix for a (Row,Column)

Index2RC

Index reference from the input matrix for b (Row,Column)

Index3RC

Index reference from the input matrix for c (Row,Column)

Index4RC

Index reference from the input matrix for d (Row,Column)

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: Local.Odds.Ratio, Nominal.Odds.Ratio, Plot.heatmap, Reversal.point, 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)
Subtable.Odds.Ratio(mat)

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