Learn R Programming

CAvariants (version 5.0)

print.CAvariants: Main printing function

Description

This function prints the results of any of the specified six variants of correspondence analysis. The input parameter is the name of the output of the main function CAvariants.

Usage

# S3 method for CAvariants
print(x, printdims = 2, ellprint = TRUE, Mell = min(nrow(x$Xtable), ncol(x$Xtable)) - 1, 
 alpha = 0.05, digits = 3,...) 

Arguments

x

The name of the output object, for example say res, used with the main function CAvariants.

printdims

The number of dimensions, printdims, that are used to generate the correspondence plot, or biplot, and for summarising the numerical output of the analysis. By default, printdims = 2.

ellprint

The flag parameter, ellprint, allows that the characteristics of the confidence ellipses (eccentricity, semi-axis, area, p-values) are displayed. By default, ellprint = TRUE.

Mell

The number of axes Mell used for the construction of the confidence ellipses. By default, it is equal to its maximum value, Mell = min(nrow(x$Xtable), ncol(x$Xtable)) - 1, i.e. the rank of the data matrix. This input parameter is identical to the parameter Mell of both the functions CAvariants and plot.CAvariants.

alpha

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

digits

The minimum number of decimal places, digits, used for displaying the numerical summaries of the analysis. By default, digits = 3.

...

Further arguments passed to or from other methods.

Value

The value of output returned depends on the kind of correspondence analysis performed

Xtable

The two-way contingency table.

Row weights: Imass

The row weight matrix. These weights depend on the type of analysis performed.

Column weights: Jmass

The column weight matrix. These weights are equal to the data column margins for all types of analysis performed.

Total inertia

The total inertia of the analysis performed. For example, when considering the variants of non symmetrical correspondence analysis, the numerator of the Goodman-Kruskal tau index, the associated C-statistic and its p-value is produced.

Inertias

The inertia values, their percentage contribution to the total inertia and the cumulative percent inertias of the row and column space. When performing an ordered correspondence analysis, this output summary describes both the row and column spaces for each principal or polynomial axis. When catype is CA or NSCA, the associated inertia values in the row and column spaces are identical. For all kind of variants, the absolute and relative contributions of rows and columns are given.

Generalized correlation matrix

The generalized correlation matrix when performing an ordered correspondence analysis, catype should be "DOCA", "DONSCA", "SOCA" or "SONSCA".

Row principal coordinates

The row principal coordinates when catype is "CA" or "NSCA".

Column principal coordinates

The column principal coordinates when catype is "CA" or "NSCA".

Row standard coordinates

The row standard coordinates when catype is "CA" or "NSCA".

Column standard coordinates

The column standard coordinates when catype is "CA" or "NSCA".

Row principal polynomial coordinates

The row principal polynomial coordinates when performing an ordered correspondence analysis.

Column principal polynomial coordinates

The column principal coordinates when performing a doubly ordered correspondence analysis.

Row standard polynomial coordinates

The row standard polynomial coordinates, i.e. standard polynomial coordinates for the row categories, when performing a doubly ordered correspondence analysis.

Column standard polynomial coordinates

The column standard polynomial coordinates, i.e. standard polynomial coordinates for the column categories, when performing an ordered correspondence analysis.

Row distances from the origin of the plot

The Euclidean distance of the row categories from the origin of the plot.

Column distances from the origin of the plot

The Euclidean distance of the column categories from the origin of the plot.

Polynomial components

The polynomial components of the total inertia and their p-values. The total inertia of the column space is partitioned to identify polynomial components, when catype is "SOCA" or "SONSCA". When catype is "DOCA" or "DONSCA", the total inertia of both the row and column space is partitioned to identify of polynomial components.

%\item{Polynomial axes}{The column polynomial axes.} %\item{Principal axes}{The row principal axes.}
Inner product

The inner product of the biplot coordinates (concerning the first two axes when firstaxis = 1 and lastaxis = 2).

ellprint

When the input flag parameter is ellprint = TRUE, then the print includes the eccentricity of the confidence ellipses, the semi-major axis length of the ellipse for each row and column point, HL Axis 1, the semi-minor axis length for the ellipse for each row and column point, HL Axis 2, the area of the ellipse for each row and column point, Area and the p-value for each row and column point, P-value, see also the parameter ellcomp of the function CAvariants for a detailed description of these parameters.

%\item{eccentricity}{Value of ellipse eccentricity, the distance between its center and either of its two foci, It can be thought of as a measure of how much %the conic section deviates from being circular.} %\item{HL Axis 1}{Value of ellipse semi-axis 1 for each row and column points.} %\item{HL Axis 2}{Value of ellipse semi-axis 2 for each row and column points.} %\item{Area }{Ellipse area for each row and column points.} %\item{pvalcol }{P-value for each row and column points.}

Details

This function uses another function (called printwithaxes) for specifying the number of matrix dimensions to print.

References

Beh EJ and Lombardo R 2014 Correspondence Analysis: Theory, Practice and New Strategies. John Wiley & Sons. Lombardo R Beh EJ 2016 Variants of Simple Correspondence Analysis. The R Journal, 8 (2), 167--184.

Examples

Run this code
# NOT RUN {
data(asbestos)
risasbestos<-CAvariants(asbestos, catype = "DOCA") 
print(risasbestos)
# }

Run the code above in your browser using DataLab