Skip to contents

Provides a summary of the results of a multivariate data analysis.

Usage

# S4 method for class 'CA'
summary(object, ..., margin = 1, active = TRUE, sup = TRUE, rank = 3)

# S4 method for class 'PCA'
summary(object, ..., margin = 1, active = TRUE, sup = TRUE, rank = 3)

Arguments

object

A CA, MCA or PCA object.

...

Currently not used.

margin

A length-one numeric vector giving the subscript which the data will be summarized: 1 indicates individuals/rows (the default), 2 indicates variables/columns.

active

A logical scalar: should the active observations be summarized?

sup

A logical scalar: should the supplementary observations be summarized?

rank

An integer value specifying the maximal number of components to be kept in the results.

See also

Other summary: tidy()

Author

N. Frerebeau

Examples

## Data from Lebart et al. 2006, p. 170-172
data("colours")

## Compute correspondence analysis
X <- ca(colours)

## Rows summary
summary(X, margin = 1)
#> --- Correspondence Analysis (CA) ------------------------------------------------
#> 
#> Eigenvalues:
#>    eigenvalues variance cumulative
#> F1       0.209   89.373     89.373
#> F2       0.022    9.515     98.888
#> F3       0.003    1.112    100.000
#> 
#> Active rows:
#>          inertia F1_coord F1_contrib F1_cos2 F2_coord F2_contrib F2_cos2
#> marron   250.487   -0.492     43.116   0.967   -0.088     13.042   0.031
#> noisette  83.321   -0.213      3.401   0.542    0.167     19.804   0.336
#> vert     148.785    0.162      1.355   0.176    0.339     55.910   0.773
#> bleu     306.566    0.547     52.128   0.977   -0.083     11.244   0.022
#>          F3_coord F3_contrib F3_cos2
#> marron      0.022      6.680   0.002
#> noisette   -0.101     61.086   0.121
#> vert        0.088     31.925   0.052
#> bleu       -0.005      0.310   0.000

## Columns summary
summary(X, margin = 2)
#> --- Correspondence Analysis (CA) ------------------------------------------------
#> 
#> Eigenvalues:
#>    eigenvalues variance cumulative
#> F1       0.209   89.373     89.373
#> F2       0.022    9.515     98.888
#> F3       0.003    1.112    100.000
#> 
#> Active columns:
#>         inertia F1_coord F1_contrib F1_cos2 F2_coord F2_contrib F2_cos2
#> brun    303.812   -0.505     22.246   0.838   -0.215     37.877   0.152
#> chatain  25.428   -0.148      5.086   0.864    0.033      2.319   0.042
#> roux    125.862   -0.130      0.964   0.133    0.320     55.131   0.812
#> blond   702.910    0.835     71.704   0.993   -0.070      4.673   0.007
#>         F3_coord F3_contrib F3_cos2
#> brun       0.056     21.633   0.010
#> chatain   -0.049     44.284   0.094
#> roux       0.083     31.913   0.055
#> blond      0.016      2.171   0.000