# FCAk: Generalisation of Correspondence Analysis for k-way tables In PTAk: Principal Tensor Analysis on k Modes

## Description

Performs a particular PTAk data as a ratio Observed/Expected under complete independence with metrics as margins of the multiple contingency table (in frequencies).

## Usage

 1 2 3 4 5 6  FCAk(X,nbPT=3,nbPT2=1,minpct=0.01, smoothing=FALSE,smoo=rep(list( function(u)ksmooth(1:length(u),u,kernel="normal", bandwidth=3,x.points=(1:length(u)))\$y),length(dim(X))), verbose=getOption("verbose"),file=NULL, modesnam=NULL,addedcomment="",chi2=TRUE,E=NULL, ...) 

## Arguments

 X a multiple contingency table (array) of order k nbPT a number or a vector of dimension (k-2) nbPT2 if 0 no 2-modes solutions will be computed, 1 =all, >1 otherwise minpct numerical 0-100 to control of computation of future solutions at this level and below smoothing see SVDgen smoo see SVDgen verbose control printing file output printed at the prompt if NULL, or printed in the given ‘file’ modesnam character vector of the names of the modes, if NULL "mo 1" ..."mo k" addedcomment character string printed if printt after the title of the analysis chi2 print the chi2 information when computing margins in FCAmet E if not NULL is an array with the same dimensions as X ... any other arguments passed to SVDGen or other functions

## Details

Gives the SVD-kmodes decomposition of the 1+χ^2/N of the multiple contingency table of full count N=∑ X_{ijk...}, i.e. complete independence + lack of independence (including marginal independences) as shown for example in Lancaster(1951)(see reference in Leibovici(2000)). Noting P=X/N, a PTAk of the (k+1)-uple is done, e.g. for a three way contingency table k=3 the 4-uple data and metrics is:

where the metrics are diagonals of the corresponding margins. For full description of arguments see PTAk. If E is not NULL an FCAk-modes relatively to a model is done (see Escoufier(1985) and therin reference Escofier(1984) for a 2-way derivation), e.g. for a three way contingency table k=3 the 4-tuple data and metrics is:

If E was the complete independence (product of the margins) then this would give an AFCk but without looking at the marginal dependencies (i.e. for a three way table no two-ways lack of independence are looked for).

## Value

a FCAk (inherits PTAk) object

## Author(s)

Didier G. Leibovici

## References

Escoufier Y (1985) L'Analyse des correspondances : ses propri<e9>t<e9>s et ses extensions. ISI 45th session Amsterdam.

Leibovici D(1993) Facteurs <e0> Mesures R<e9>p<e9>t<e9>es et Analyses Factorielles : applications <e0> un suivi <e9>pid<e9>miologique. Universit<e9> de Montpellier II. PhD Thesis in Math<e9>matiques et Applications (Biostatistiques).

Leibovici D (2000) Multiway Multidimensional Analysis for Pharmaco-EEG Studies.http://www.fmrib.ox.ac.uk/analysis/techrep/tr00dl2/tr00dl2.pdf

Leibovici DG (2010) Spatio-temporal Multiway Decomposition using Principal Tensor Analysis on k-modes:the R package PTAk. Journal of Statistical Software, 34(10), 1-34. doi: 10.18637/jss.v034.i10

Leibovici DG and Birkin MH (2013) Simple, multiple and multiway correspondence analysis applied to spatial census-based population microsimulation studies using R. NCRM Working Paper. NCRM-n^o 07/13, Id-3178 https://eprints.ncrm.ac.uk/id/eprint/3178

PTAk, FCAmet, summary.FCAk
 1 2  # try the demo # demo.FCAk()