ilr.2x2: ilr coordinates in 2x2 compositional tables

Description Usage Arguments Value Author(s) References Examples

View source: R/ilr.2x2.R

Description

ilr coordinates of original, independent and interaction compositional table using SBP1 and SBP2

Usage

1
ilr.2x2(x, margin = 1, type = "independence", version = "book")

Arguments

x

a 2x2 table

margin

for 2x2 tables available for a whole set of another dimension. For example, if 2x2 tables are available for every country.

type

choose between “independence” or “interaction” table

version

the version used in the “paper” below or the version of the “book”.

Value

The ilr coordinates

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

1
2
3
4
5
data(employment) 
ilr.2x2(employment[,,"AUT"])
ilr.2x2(employment[,,"AUT"], version = "paper")
ilr.2x2(employment, margin = 3, version = "paper")
ilr.2x2(employment[,,"AUT"], type = "interaction")

Example output

Loading required package: robustbase
Loading required package: ggplot2
Loading required package: data.table
Loading required package: e1071
Loading required package: pls

Attaching package: 'pls'

The following object is masked from 'package:stats':

    loadings

sROC 0.1-2 loaded

Attaching package: 'robCompositions'

The following object is masked from 'package:robustbase':

    alcohol

$z1
[1]  1.0396917  1.1896611 -0.6205295

$z2
[1] NA NA NA

$z1
[1]  0.09360607 -1.63386049 -0.45060728

$z2
[1]  1.0396917 -1.1896611 -0.6205295

$AUT
$AUT$z1
[1]  0.09360607 -1.63386049 -0.45060728

$AUT$z2
[1]  1.0396917 -1.1896611 -0.6205295


$BEL
$BEL$z1
[1]  0.03507662 -1.54287849 -0.46000568

$BEL$z2
[1]  0.9754021 -1.1061691 -0.6467536


$BUL
$BUL$z1
[1] -2.09389983 -3.07728128 -0.06210816

$BUL$z2
[1]  0.09129829 -2.63394969 -2.62905072


$CRO
$CRO$z1
[1] -1.1154714 -1.9173102 -0.1624981

$CRO$z2
[1]  0.2536244 -1.5791903 -1.5455074


$CYP
$CYP$z1
[1] -1.0616464 -1.9493143 -0.1771216

$CYP$z2
[1]  0.3081062 -1.5995949 -1.5181100


$CZE
$CZE$z1
[1] -1.1148091 -2.8439474 -0.2502744

$CZE$z2
[1]  0.6943721 -2.3377934 -1.8563519


$DEN
$DEN$z1
[1] -0.1814217 -1.2292657 -0.2887374

$DEN$z2
[1]  0.6012699 -0.9202067 -0.6473574


$EST
$EST$z1
[1] -0.71096542 -2.26390235 -0.06288381

$EST$z2
[1]  0.5582237 -1.9291550 -1.2654751


$FIN
$FIN$z1
[1] -0.7036539 -1.6737354 -0.1226940

$FIN$z2
[1]  0.3638026 -1.3881504 -1.1190438


$FRA
$FRA$z1
[1] -0.1997456 -1.9708782 -0.2745255

$FRA$z2
[1]  0.8834034 -1.5695678 -0.8692979


$GER
$GER$z1
[1]  0.0965658 -1.5007364 -0.4644172

$GER$z2
[1]  0.9968179 -1.0674672 -0.5865882


$GRE
$GRE$z1
[1] -1.2615624 -2.3165443 -0.3212146

$GRE$z2
[1]  0.4444949 -1.8455790 -1.8593974


$HUN
$HUN$z1
[1] -1.2384128 -2.3656534 -0.1462628

$HUN$z2
[1]  0.3541994 -1.9755846 -1.7671966


$ICE
$ICE$z1
[1] -0.2298561 -1.6190589 -0.2545604

$ICE$z2
[1]  0.7082719 -1.2748660 -0.7823390


$IRL
$IRL$z1
[1] -0.2131713 -1.3837699 -0.3116958

$IRL$z2
[1]  0.6622494 -1.0425319 -0.7293615


$ITA
$ITA$z1
[1] -0.3467584 -1.9845837 -0.4681287

$ITA$z2
[1]  0.9410189 -1.4846356 -1.0900913


$LAT
$LAT$z1
[1] -1.110118811 -2.042554606 -0.006099937

$LAT$z2
[1]  0.1972553 -1.7658542 -1.4990929


$LIT
$LIT$z1
[1] -1.09747578 -2.13102326  0.01096487

$LIT$z2
[1]  0.2286053 -1.8510027 -1.5057762


$LUX
$LUX$z1
[1] -0.01834684 -2.16564825 -0.47395272

$LUX$z2
[1]  1.2086648 -1.6385300 -0.8771253


$MLT
$MLT$z1
[1] -0.6586257 -1.7968057 -0.6104440

$MLT$z2
[1]  0.7849342 -1.2508574 -1.3616808


$NED
$NED$z1
[1]  0.5828502 -0.3432613 -0.9276963

$NED$z2
[1]  1.13262491  0.16657520 -0.08704397


$NOR
$NOR$z1
[1] -0.03441073 -1.22378765 -0.35404857

$NOR$z2
[1]  0.7300923 -0.8828069 -0.5583976


$POL
$POL$z1
[1] -1.1345973 -2.2200023 -0.1888041

$POL$z2
[1]  0.3847568 -1.8281763 -1.6616564


$POR
$POR$z1
[1] -0.9167077 -1.6554247 -0.1372034

$POR$z2
[1]  0.2435803 -1.3650382 -1.2949704


$ROM
$ROM$z1
[1] -1.2482939 -1.7387171 -0.1569035

$ROM$z2
[1]  0.100073 -1.427321 -1.599604


$SVK
$SVK$z1
[1] -1.529742 -2.795724 -0.185353

$SVK$z2
[1]  0.3892169 -2.3284912 -2.1487614


$SLO
$SLO$z1
[1] -1.0409436 -1.9113934 -0.1581658

$SLO$z2
[1]  0.2911741 -1.5762323 -1.4807815


$ESP
$ESP$z1
[1] -0.4693464 -2.0767609 -0.2923921

$ESP$z2
[1]  0.7836093 -1.6523317 -1.1289250


$SWE
$SWE$z1
[1] -0.1035436 -1.3115425 -0.3263942

$SWE$z2
[1]  0.7064496 -0.9726320 -0.6263498


$SUI
$SUI$z1
[1]  0.3226223 -1.0691730 -0.6677954

$SUI$z2
[1]  1.0949568 -0.5920333 -0.3791214


$MAC
$MAC$z1
[1] -1.6699356 -2.1018849 -0.3053819

$MAC$z2
[1]  0.1098908 -1.6675947 -2.1229495


$TUR
$TUR$z1
[1] -0.8501284 -1.6837479 -0.7872265

$TUR$z2
[1]  0.7532185 -1.0645552 -1.5737963


$GBR
$GBR$z1
[1] -0.01138482 -1.34367365 -0.40422166

$GBR$z2
[1]  0.8278073 -0.9615447 -0.5992917


$z1
[1]  1.0396917  0.4024368 -1.2799980

$z2
[1] NA NA NA

robCompositions documentation built on Jan. 13, 2021, 10:07 p.m.