FCA2 {PTAk} | R Documentation |
Correspondence Analysis for 2-way tables
Description
Performs a particular SVDgen
data as a ratio Observed/Expected
under complete independence with metrics as margins of the
contingency table (in frequencies).
Usage
FCA2(X, nbdim =NULL, 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 = FALSE, E = NULL, ...)
Arguments
X |
a matrix table of positive values |
nbdim |
a number of dimension to retain, if |
minpct |
numerical 0-100 to control of computation of future solutions at this level and below |
smoothing |
see |
smoo |
see |
verbose |
control printing |
file |
output printed at the prompt if |
modesnam |
character vector of the names of the modes, if |
addedcomment |
character string printed if |
chi2 |
print the chi2 information when computing margins in |
E |
if not |
... |
any other arguments passed to SVDGen or other functions |
Details
Gives the SVD-2modes decomposition of the 1+\chi^2/N
of
the contingency table of full count N=\sum X_{ij}
,
i.e. complete independence + lack of independence (including marginal
independences) as shown for example in Lancaster(1951)(see reference
in Leibovici(1993 or 2000)). Noting P=X/N
, a SVD
of the
(3)
-uple is done, that is :
((D_I^{-1} \otimes D_J^{-1})..P, \quad D_I, \quad D_J)
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).
Value
a FCA2
(inherits FCAk
and PTAk
) object
Author(s)
Didier G. Leibovici
References
Escoufier Y (1985) L'Analyse des correspondances : ses propriétés et ses extensions. ISI 45th session Amsterdam.
Leibovici D(1993) Facteurs à Mesures Répétées et Analyses Factorielles : applications à un suivi Epidémiologique. Université de Montpellier II. PhD Thesis in Mathé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
See Also
Examples
data(crimerate)
cri.FCA2 <- FCA2(crimerate)
summary(cri.FCA2)
plot(cri.FCA2, mod = c(1,2), nb1 = 2, nb2 = 3) # unscaled
plot(cri.FCA2, mod = c(1,2), nb1 = 2, nb2 = 3, coefi =
list(c(0.130787,0.130787),c(0.104359,0.104359)) )# symmetric-map biplot
CTR(cri.FCA2, mod = 1, solnbs = 2:4)
CTR(cri.FCA2, mod = 2, solnbs = 2:4)
COS2(cri.FCA2, mod = 2, solnbs = 2:4)