ind2x2: Independence 2x2 compositional table

View source: R/ind2x2.R

ind2x2R Documentation

Independence 2x2 compositional table

Description

Estimates the expected frequencies from an 2x2 table under the null hypotheses of independence.

Usage

ind2x2(x, margin = 3, pTabMethod = c("dirichlet", "half", "classical"))

Arguments

x

a 2x2 table

margin

if multidimensional table (larger than 2-dimensional), then the margin determines on which dimension the independene tables should be estimated.

pTabMethod

‘classical’ that is function prop.table() from package base or method “half” that add 1/2 to each cell to avoid zero problems.

Value

The independence table(s) with either relative or absolute frequencies.

Author(s)

Kamila Facevicova, Matthias Templ

References

Facevicova, K., Hron, K., Todorov, V., Guo, D., Templ, M. (2014). Logratio approach to statistical analysis of 2x2 compositional tables. Journal of Applied Statistics, 41 (5), 944–958.

Examples

data(employment) 
ind2x2(employment)

robCompositions documentation built on Aug. 25, 2023, 5:13 p.m.