Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

int2x2

Interaction 2x2 table


Description

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

Usage

int2x2(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

to estimate the propability table. Default is ‘dirichlet’. Other available methods: ‘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) 
int2x2(employment)

robCompositions

Compositional Data Analysis

v2.3.0
GPL (>= 2)
Authors
Matthias Templ [aut, cre] (<https://orcid.org/0000-0002-8638-5276>), Karel Hron [aut] (<https://orcid.org/0000-0002-1847-6598>), Peter Filzmoser [aut] (<https://orcid.org/0000-0002-8014-4682>), Kamila Facevicova [ctb], Petra Kynclova [ctb], Jan Walach [ctb], Veronika Pintar [ctb], Jiajia Chen [ctb], Dominika Miksova [ctb], Bernhard Meindl [ctb], Alessandra Menafoglio [ctb] (<https://orcid.org/0000-0003-0682-6412>), Alessia Di Blasi [ctb], Federico Pavone [ctb], Gianluca Zeni [ctb]
Initial release
2020-11-18

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.