Bivariate analysis

Once the user has done the univariate analysis, it can be useful to have a look at the variables taken by couples.

chisq.desc()

The function chisq.desc() compares one or several variables X with one or several variables Y.
The user has to choose a criterion (chi2 distance or hypergeometric law criterion).

The output is a table showing the distance between each pair of variables. The cells of the table are coloured according to the value of the chi2 distance. If this distance is upper than the considered threshold, then the variable contributes significantly to the chi2 and the cell is coloured in blue. Otherwise, the cell's colour is pink. data(tea)
chisq.desc(dataset=tea,Y=c(1,2),X=c(3,4), method="proba")
#dataset: the data set used
#Y: first group of variables
#X: second group of variables (to be crossed with the first one)
#method: if "proba" the colour depends on the p-values given by the hypergeometric law. If "mean" the colour depends on the value of the contribution to the chi-square distance

Chi2 test between "refined" and "stimulating", and "shape" and "location.of.purchase" Click to view

Chi2 test between "location.of.purchase" and "stimulating" Click to viewChi2 test between "location.of.purchase" and "refined"

Chi2 test between "shape" and "stimulating"Click to viewChi2 test between "shape" and "refined"

Numerical result of the Chi2 test. Example for the variables "shape" and "refined" Click to view