graphCA: Correspondance Analysis factor map

View source: R/graphCA.R

graphCAR Documentation

Correspondance Analysis factor map

Description

Realise the Correspondence Analysis simultaneous graph

Usage

graphCA(res, file = "", dim = 1:2, Rselec = "cos2", Cselec = "cos2", Rcoef = 1, 
        Ccoef = 1, figure.title = "Figure", graph = TRUE, cex = 0.7, 
		codeGraphCA = NULL,options = NULL)

Arguments

res

an object of class CA.

file

the file path where to write the description in Rmarkdown language. If not specified, the description is written in the console.

dim

a 2 dimensional numerical vector giving the factorial dimensions to use for the representation (by default the first plane)

Rselec

the rows to select ; see the details section.

Cselec

the columns to select ; see the details section.

Rcoef

a numerical coefficient to adjust the rows selection rule ; see the details section.

Ccoef

a numerical coefficient to adjust the columns selection rule ; see the details section.

figure.title

the text label to add before graph title.

graph

a boolean : if TRUE, graphs are plotted.

cex

an optional argument for the generic plot functions, used to adjust the size of the elements plotted.

codeGraphCA

a character string corresponding to the code to use for the CA graph.

options

a character string that gives the output options fir the figures. If NULL, options="r, echo = FALSE, fig.align = 'center', fig.height = 3.5, fig.width = 5.5" for linux and Mac and options="r, echo = FALSE, fig.height = 3.5, fig.width = 5.5" for Windows

Details

The Rselec argument (respectively Cselec) is used in order to select a part of the elements that are drawn and described. For example, you can use either :
- Rselec = 1:5 then the rows (the columns) numbered 1 to 5 are drawn.
- Rselec = c("name1","name5") and then the rows (the columns) named name1 and name5 are drawn.
- Rselec = "contrib 10" then the 10 active or illustrative rows (the columns) that have the highest contribution on the 2 dimensions of the plane are drawn.
- Rselec = "contrib" then the optimal number of active or illustrative rows (the columns) that have the highest contribution on the 2 dimensions of the plane are drawn.
- Rselec = "cos2 5" then the 5 active or illustrative rows (the columns) that have the highest cos2 on the 2 dimensions of the plane are drawn.
- Rselec = "cos2 0.8" then the active or illustrative rows (the columns) that have a cos2 higher to 0.8 on the plane are drawn.
- Rselec = "cos2" then the optimal number of active or illustrative rows (the columns) that have the highest cos2 on the 2 dimensions of the plane are drawn.

The Rcoef argument (respectively Ccoef) is used in order to adjust the selection of the elements when based on Rselec = "contrib" or Rselec = "cos2". For example :
- if Rcoef = 2, the threshold is 2 times higher, and thus 2 times more restrictive.
- if Rcoef = 0.5, the threshold is 2 times lower, and thus 2 times less restrictive.

Author(s)

Simon Thuleau and Francois Husson

See Also

factoGraph, graphInd, graphHab, graphVar, graphSup

Examples

require(FactoMineR)
data(children)
res.ca = CA(children, row.sup = 15:18, col.sup = 6:8, graph = FALSE)
## Not run: 
graphCA(res.ca)

## End(Not run)

FactoInvestigate documentation built on Nov. 28, 2023, 1:10 a.m.