cols.cntr: Columns contribution chart

Description Usage Arguments Details Examples

View source: R/cols_cntr.R

Description

This function allows to calculate the contribution of the column categories to the selected dimension.

Usage

1
2
3
cols.cntr(data, x = 1, sort = TRUE, corr.thrs = 0, leg = TRUE,
  cex.labls = 0.75, dotprightm = 5, cex.leg = 0.6, leg.x.spc = 1,
  leg.y.spc = 1)

Arguments

data:

name of the dataset (must be in dataframe format).

x:

dimension for which the column categories contribution is returned (1st dimension by default).

sort:

logical value (TRUE/FALSE) which allows to sort the categories in descending order of contribution to the inertia of the selected dimension. TRUE is set by default.

corr.thrs:

threshold above which the row categories correlation will be displayed in the plot's legend.

leg:

enable (TRUE; default) or disable (FALSE) the legend at the right-hand side of the dotplot.

cex.labls:

adjust the size of the dotplot's labels.

dotprightm:

increases the empty space between the right margin of the dotplot and the left margin of the legend box.

cex.leg:

adjust the size of the legend's characters.

leg.x.spc:

adjust the horizontal space of the chart's legend. See more info from the 'legend' function's help (?legend).

leg.y.spc:

adjust the y interspace of the chart's legend. See more info from the 'legend' function's help (?legend).

Details

The function displays the contribution of the categories as a dotplot. A reference line indicates the threshold above which a contribution can be considered important for the determination of the selected dimension. The parameter sort=TRUE sorts the categories in descending order of contribution to the inertia of the selected dimension. At the left-hand side of the plot, the categories' labels are given a symbol (+ or -) according to wheather each category is actually contributing to the definition of the positive or negative side of the dimension, respectively. The categories are grouped into two groups: 'major' and 'minor' contributors to the inertia of the selected dimension. At the right-hand side, a legend (which is enabled/disabled using the 'leg' parameter) reports the correlation (sqrt(COS2)) of the row categories with the selected dimension. A symbol (+ or -) indicates with which side of the selected dimension each row category is correlated.

Examples

1
2
3
data(greenacre_data)
cols.cntr(greenacre_data, 2, cti=TRUE, sort=TRUE) # Plots the contribution of the column categories to the 2nd CA dimension, and also displays the contribution to the total inertia. The categories are sorted in descending order of contribution to the inertia of the selected dimension.
 

gianmarcoalberti/CAinterprTools documentation built on May 31, 2018, 6:59 a.m.