BivariateAssoc.Rd
Computes bivariate association measures between a response and predictor variables (and, optionnaly, between every pairs of predictor variables.)
BivariateAssoc(Y, X, xx = TRUE)
the response variable
the predictor variables
whether the association measures should be computed for couples of predictor variables (default) or not. With a lot of predictors, consider setting xx to FALSE (for reasons of computation time).
For each pair of variable, a permutation test is computed, following the framework used in conditional inference trees to choose a splitting variable. This test produces a p-value, transformed as -log(1-p) for reasons of comparison stability. The function also computes a "standard" association measure : kenddal's tau correlation for pairs of numeric variables, Cramer's V for pairs of factors and eta-squared for pairs numeric-factor.
A list of the following items :
: a table with the association measures between the response and predictor variables
: a table with the association measures between every couples of predictor variables
In each table :
: name of the "standard" association measure
: value of the "standard" association measure
: p-value from the permutation test
: p-value from the permutation test transformed as -log(1-p), which serves to sort rows
Hothorn T, Hornik K, Van De Wiel MA, Zeileis A. "A lego system for conditional inference". The American Statistician. 60:257–263, 2006.
Hothorn T, Hornik K, Zeileis A. "Unbiased Recursive Partitioning: A Conditional Inference Framework". Journal of Computational and Graphical Statistics, 15(3):651-674, 2006.
see also https://stats.stackexchange.com/questions/171301/interpreting-ctree-partykit-output-in-r
ctree
data(iris)
iris2 = iris
iris2$Species = factor(iris$Species == "versicolor")
BivariateAssoc(iris2$Species,iris2[,1:4])
#> $YX
#> variable measure assoc p.value criterion
#> 1 Sepal.Width eta2 0.213 0.00000 0.0000000454
#> 2 Petal.Length eta2 0.034 0.05402 0.0555377285
#> 3 Petal.Width eta2 0.007 0.47827 0.6505995623
#> 4 Sepal.Length eta2 0.000 0.80145 1.6166982274
#>
#> $XX
#> variable1 variable2 measure assoc p.value criterion
#> 1 Sepal.Length Petal.Length kendall 0.719 0.00000 0.0000000000
#> 2 Sepal.Length Petal.Width kendall 0.655 0.00000 0.0000000000
#> 3 Petal.Length Petal.Width kendall 0.807 0.00000 0.0000000000
#> 4 Sepal.Width Petal.Length kendall -0.186 0.00000 0.0000001697
#> 5 Sepal.Width Petal.Width kendall -0.157 0.00001 0.0000078536
#> 6 Sepal.Length Sepal.Width kendall -0.077 0.15125 0.1639933152
#>