R: Coordinate representation of compositional tables

coord {robCompositions} | R Documentation

## Coordinate representation of compositional tables

### Description

General approach to orthonormal coordinates for compositional tables

### Usage

    coord(x, SBPr, SBPc)

    ## S3 method for class 'coord'
    print(x, ...)

### Arguments

`x` | an object of class “table”, “data.frame” or “matrix”
`SBPr` | sequential binary partition for rows
`SBPc` | sequential binary partition for columns
`...` | further arguments passed to the print function

### Details

A contingency or propability table can be considered as a two-factor composition, we refer to compositional tables. This function constructs orthonomal coordinates for compositional tables using the balances approach for given sequential binary partitions on rows and columns of the compositional table.

### Value

Row and column balances and odds ratios as coordinate representations of the independence and interaction tables, respectively.

`row_balances` | row balances
`row_bin` | binary partition for rows
`col_balances` | column balances
`col_bin` | binary parition for columns
`odds_ratios_coord` | odds ratio coordinates

### Author(s)

Kamila Facevicova, and minor adaption by Matthias Templ

### References

Facevicova, K., Hron, K., Todorov, V., Templ, M. (2018) General approach to coordinate representation of compositional tables. Scandinavian Journal of Statistics, 45(4), 879-899.

### Examples

    x <- rbind(c(1,5,3,6,8,4),c(6,4,9,5,8,12),c(15,2,68,42,11,6),
               c(20,15,4,6,23,8),c(11,20,35,26,44,8))
    x
    SBPc <- rbind(c(1,1,1,1,-1,-1),c(1,-1,-1,-1,0,0),c(0,1,1,-1,0,0),
                  c(0,1,-1,0,0,0),c(0,0,0,0,1,-1))
    SBPc
    SBPr <- rbind(c(1,1,1,-1,-1),c(1,1,-1,0,0),c(1,-1,0,0,0),c(0,0,0,1,-1))
    SBPr
    result <- coord(x, SBPr,SBPc)
    result
    data(socExp)

[Package robCompositions version 2.1.0 Index]