CAvariants {CAvariants}R Documentation

Six variants of correspondence analysis

Description

It performs
1) simple correspondence analysis
2) doubly ordered correspondence analysis
3) singly ordered correspondence analysis
4) non symmetrical correspondence analysis
5) doubly ordered non symmetrical correspondence analysis
6) singly ordered non symmetrical correspondence analysis

Usage

CAvariants(Xtable, mj = NULL, mi = NULL, firstaxis = 1, lastaxis = 2,
catype = "CA",  M = min(nrow(Xtable), ncol(Xtable)) - 1, alpha = 0.05) 

Arguments

Xtable

The two-way contingency table.

mi

The assigned ordered scores for the row categories. By default, mi = NULL, which gives consecutive integer valued (natural) scores.

mj

The assigned ordered scores for the column categories, By default, mj = NULL, which gives consecutive integer valued (natural) scores.

firstaxis

The horizontal polynomial, or principal, axis. It is used for the construction of the Inner product table. By default firstaxis = 1.

lastaxis

The vertical polynomial, or principal, axis. It is used for the construction of the Inner product table. By default lastaxis = 2.

catype

The input parameter for specifying what variant of correspondence analysis is to be performed. By default, catype = "CA". Other possible values are: catype = "SOCA", catype = "DOCA", catype = "NSCA", catype = "SONSCA", catype = "DONSCA".

M

The number of axes used for determining the structure of the elliptical confidence regions. By default, M = min(nrow(Xtable), ncol(Xtable)) - 1, i.e. the rank of the data matrix.

alpha

The level of significance for the elliptical regions. By default, alpha = 0.05.

Value

Description of the output returned

Xtable

The two-way contingency table.

rows

The number of rows of the two-way contingency table.

cols

The number of columns of the two-way contingency table.

r

The rank of the two-way contingency table.

n

The total number of observations of the two-way contingency table.

rowlabels

The labels of the row variable.

collabels

The labels of the column variable.

Rprinccoord

The row principal coordinates. When the input parameter catype is
"DOCA", "SOCA", "DONSCA" or "SONSCA", they are row principal polynomial coordinates.

Cprinccoord

The column principal coordinates. When the input parameter catype is
"DOCA", "SOCA", "DONSCA" or "SONSCA", they are column principal polynomial coordinates.

Rstdcoord

The row standard coordinates. When the input parameter catype is
"DOCA", "SOCA", "DONSCA" or "SONSCA", they are row standard polynomial coordinates.

Cstdcoord

The column standard coordinates. When the input parameter catype is
"DOCA", "SOCA", "DONSCA" or "SONSCA", they are column standard polynomial coordinates.

tauden

The denominator of the Goodman-Kruskal tau index is given when the input parameter catype is "NSCA", "SONSCA", or "DONSCA". Otherwise it is NULL.

tau

The index of Goodman and Kruskal is given when the input parameter catype is "NSCA", "SONSCA", or "DONSCA". Otherwise it is NULL.

inertiasum

The total inertia of the analysis based on Pearson's chi-squared when catype is "CA", "DOCA" or "SOCA", or based on the Goodman-Kruskal tau when catype is "NSCA", "DONSCA" or "SONSCA" (numerator of the Goodman-Kruskal tau index).

singvalue

The singular values of the two-way contingency table.

inertias

The inertia in absolute value and percentage, in the row space for each principal or polynomial axis.

inertias2

The inertia in absolute value and percentage, in the column space for each principal or polynomial axis. When catype is "CA" or "NSCA" the associated inertia in the row and column spaces are the same for each principal axis.

t.inertia

The total inertia of the two-way contingency table.

comps

The polynomial components of inertia when the variables are ordered.

catype

The type of correspondence analysis chosen by the analyst. By default, catype = "ca".

mj

The ordered scores of the column variable. When mj = NULL, the natural scores are used (i = 1,...,cols).

mi

The ordered scores of the row variable. When mi = NULL, the natural scores are used (i = 1,...,rows).

pcc

The weighted centered column profile matrix.

Jmass

The weight matrix of the column variable.

Imass

The weight matrix of the row variable.

Innprod

The inner product, Inner product, of the biplot coordinates (for the two axes defined by firstaxis = 1 and lastaxis = 2)

Z

The generalised correlation matrix when catype = "SOCA", catype = "DOCA" , catype = "SONSCA", catype = "DONSCA", but when catype = "CA", or catype = "NSCA", it gives again the inner product matrix of biplot coordinates.

M

The number of axes used for determining the structure of the elliptical confidence regions. By default, M = min(nrow(Xtable), ncol(Xtable)) - 1, i.e. the rank of the data matrix.

eccentricity

When ellcomp = TRUE, the output gives the eccentricity of the confidence ellipses.

row.summ

When ellcomp = TRUE, the output gives for each row the summary results that contain the semi-major axis length of the ellipse, HL Axis 1, the semi-minor axis length for the ellipse, HL Axis 2, the area of the ellipse, Area and the p-value, P-value.

col.summ

When ellcomp = TRUE, the output gives for each column point, the summary results that contain the semi-major axis length of the ellipse, HL Axis 1, the semi-minor axis length for the ellipse, HL Axis 2, the area of the ellipse, Area and the p-value, P-value.

Note

This function recalls internally many other functions, depending on the setting of the input parameter catype, it recalls one of the six functions which does a variant of correspondence analysis. After performing a variant of correspondence analysis, it gives the output object necessary for printing and plotting the results. These two important functions are print.CAvariants and plot.CAvariants.

Author(s)

Rosaria Lombardo and Eric J Beh

References

Beh EJ and Lombardo R 2014 Correspondence Analysis: Theory, Practice and New Strategies. Wiley.
Lombardo R Beh EJ 2016 Variants of Simple Correspondence Analysis. The R Journal, 8 (2), 167–184.
Lombardo R Beh EJ and Kroonenberg PM 2016 Modelling Trends in Ordered Correspondence Analysis Using Orthogonal Polynomials. Psychometrika, 81(2), 325–349.

Examples

data(asbestos)
CAvariants(asbestos, catype = "CA") 
CAvariants(asbestos, catype = "DOCA", mi = c(1:nrow(asbestos)), mj =c(4.5,14.5,24.5,34.5,44.5),  
firstaxis = 1, lastaxis = 2, M = min(nrow(asbestos), ncol(asbestos)) - 1) 
CAvariants(asbestos, catype = "DONSCA") 
data(shopdataM)
CAvariants(shopdataM, catype = "NSCA")
CAvariants(shopdataM, catype = "SONSCA")
CAvariants(shopdataM, catype = "SOCA")

[Package CAvariants version 6.0 Index]