Learn R Programming

PTAk (version 1.2-6)

FCAk: Generalisation of Correspondence Analysis for k-way tables

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

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

Value

  • a FCAk (inherits PTAk) object

Details

Gives the SVD-kmodes decomposition of the $1+\chi^2/N$ of the multiple contingency table of full count $N=\sum 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: $$((D_I^{-1} \otimes D_J^{-1} \otimes D_K^{-1})P, \quad D_I, \quad D_J, \quad D_K)$$ 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: $$((D_I^{-1} \otimes D_J^{-1} \otimes D_K^{-1})(P-E), \quad D_I, \quad D_J, \quad D_K)$$ 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).

References

Escoufier Y (1985) L'Analyse des correspondances : ses proprits et ses extensions. ISI 45th session Amsterdam.

Leibovici D(1993) Facteurs Mesures Rptes et Analyses Factorielles : applications un suivi pidmiologique. Universit de Montpellier II. PhD Thesis in Mathmatiques 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 D (2008) Spatio-temporal Multiway Decomposition using Principal Tensor Analysis on k-modes:the R package PTAk . to be submitted soon at Journal of Statisticcal Software.

See Also

PTAk, FCAmet, summary.FCAk

Examples

Run this code
# try the demo
   # demo.FCAk()

Run the code above in your browser using DataLab