Learn R Programming

pamctdp (version 0.2.2)

witwit.model: Within Correspondence Analysis using divers Models and Weights

Description

witwit.model performs an Double Within Tables Correspondence Analysis. Modification of witwit.coa of ade4 to allow Intra Block Model and divers weights

Usage

witwit.model(dudi, row.blocks, col.blocks, pfil = dudi$lw, pcol = dudi$cw, 
    model = "C", weight = "coa", scannf = TRUE, nf = 2,eps=1e-15,iter=100)
## S3 method for class 'wwmodel':
summary(object, \dots) 
## S3 method for class 'wwmodel':
print(x, \dots)

Arguments

dudi
an object of class coa
row.blocks
a numeric vector indicating the row numbers for each block of rows
col.blocks
a numeric vector indicating the column numbers for each block of columns
scannf
a logical value indicating whether the eigenvalues bar plot should be displayed
nf
if scannf FALSE, an integer indicating the number of kept axes
pfil
a numeric vector indicating the row weights
pcol
a numeric vector indicating the column weights
model
"C": the same model of ICA,"B": intra blocks independence model
weight
c("coa": the same row and columns weights than CA, "mfa": MFA-like weights in rows and columns, "mafc": MFA-like weights in columns, "mfar": MFA-like weights in rows
eps
convergence error if weight="mfa"
iter
maximum itection number if if weight="mfa"
object
an object of class wwmodel
x
an object of class wwmodel
...
further arguments passed to or from other methods

Value

  • Returns a list of class wwmodel containing:
  • taba data frame with I rows and K columns
  • cwcolumn weights, a vector with K components
  • lwrow weights, a vector with I components
  • eigeigenvalues, a vector with min(I,K) components
  • nfinteger, number of kept axes
  • c1principal axes, data frame with I rows and nf columns
  • l1principal components, data frame with I rows and nf columns
  • cocolumn coordinates, data frame with K rows and nf columns
  • lirow coordinates, data frame with I rows and nf columns
  • calloriginal call
  • rbvara data frame with the within variances of the rows of the factorial coordinates
  • lbwa data frame with the marginal weighting of the row bands
  • cvara data frame with the within variances of the columns of the factorial coordinates
  • cbwa data frame with the marginal weighting of the column bands
  • homhomotecia to read some aids as in MFA
  • rblnumber of rows in each row-band
  • cblnumber of columns in each column-band
  • sepeig.colband-column separate firt eigenvalues if weight="mfa"
  • sepeig.rowband-row separate firt eigenvalues if weight="mfa"

encoding

latin1

Details

This function is builp up with witwit.coa of ade4, in order to allow diferents weights and models in a contingency table with double structure of partition. If model="C" and weight="coa" the results are the same of witwit.coa. If model="B" and weight="coa" a Intra-Blocks Correspondence Analysis (IBCA) is buld up If model="B" and weight="mfa" a Weighted Intra-Blocks Correspondence Analysis (WIBCA) is buld up

References

Becue M., Pages J. and Pardo C.E. (2005). Contingency table with a double partition on rows and columns. Visualization and comparison of the partial and global structures. In: Proceedings ASMDA, Brest, France. May,17-20, 2005. Eds: Jacques Janssen and Philippe Lenca. ENST Bretagne. pages 355--364. http://conferences.telecom-bretagne.eu/asmda2005/IMG/pdf/proceedings/355.pdf Cazes, P., Chessel, D. and Doledec, S. (1988) L'analyse des correspondances internes d'un tableau partitionne : son usage en hydrobiologie. Revue de Statistique Appliquee, 36, 39--54. http://pbil.univ-lyon1.fr/R/articles/arti054.pdf Pardo Campo El�as (2005). An�lisis de correspondencias de tablas de contingencia estructuradas. In: Memorias del Coloquio Distrital de Matem�ticas y Estad�stica. Volume 7. Universidad Distrital, Bogot� http://www.docentes.unal.edu.co/cepardot/docs/ColoquioDistritalMatEst/AnalCorresTCE.pdf

Examples

Run this code
data(ardeche)
# change column names
names(ardeche$tab) <- paste(ardeche$sta.fac,ardeche$dat.fac,sep="") 
rownames(ardeche$tab) <- # change row names
paste(strtrim(rownames(ardeche$tab),1),substr(rownames(ardeche$tab),4,
	length(rownames(ardeche$tab))),sep="")
coa1 <- dudi.coa(ardeche$tab, scannf = FALSE, nf = 4)
ww <- witwit.model(coa1, ardeche$row.blocks, ardeche$col.blocks, scann = FALSE)
ww
plot(ww)
summary(ww)

Run the code above in your browser using DataLab