| coord {robCompositions} | R Documentation |
General approach to orthonormal coordinates for compositional tables
coord(x, SBPr, SBPc) ## S3 method for class 'coord' print(x, ...)
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 |
A contingency or propability table is by definition a compositional data set. This approach consider the related special properties of compositional tables. It constructs orthonomal coordinates for compositional tables using the isometric log-ratio approach for given sequential binary partitions on rows and columns.
Row and column balances, odds ratios, particularly
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 |
Kamila Facevicova, and minor adaption by Matthias Templ
Kamila Facevicova, Karel Hron, Valentin Todorov, Matthias Templ (201x) General approach to coordinate representation of compositional tables. Submitted to JRSS B.
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)