anacor {anacor} | R Documentation |
This function performs simple and canonical CA for incomplete tables based on SVD. Different scaling methods for row and column scores are provided.
anacor(tab, ndim = 2, row.covariates, col.covariates, scaling = c("Benzecri","Benzecri"), eps = 1e-06) ## S3 method for class 'anacor': print(x,...) ## S3 method for class 'anacor': summary(object,...)
tab |
Data frame of dimension n times m with frequencies. Missings are coded as NA . |
ndim |
Number of dimensions. |
row.covariates |
Matrix with n rows containing covariates for the row scores. |
col.covariates |
Matrix with m rows containing covariates for the column scores. |
scaling |
A vector with two elements. The first one corresponds to the method for row scaling, the
second one for column scaling. Available scaling methods are "standard" , "centroid" ,
"Benzecri" , "Goodman" . |
eps |
Convergence criterion for reconstitution algorithm. |
x |
Object of class "anacor" in print.anacor . |
object |
Object of class "anacor" in summary.anacor . |
... |
Additional arguments ignored. |
Missing values in tab
are imputed using the reconstitution algorithm.
Setting scaling
to "standard"
leads to standard coordinates.
Principal coordinates can be computed by means of Benzecri decomposition.
Furthermore, scores can be scaled around their centroid.
Goodman scaling is based on Fisher-Maung decomposition.
row.scores |
Scaled row scores. |
col.scores |
Scaled column scores. |
ndim |
Number of dimensions extracted. |
chisq |
Total chi-square value. |
chisq.decomp |
Chi-square decomposition across dimensions with p-values. |
singular.values |
Singular values without trivial solution. |
se.singular.values |
Standard errors for the singular values. |
left.singvec |
Left singular vectors without trivial solution. |
right.singvec |
Right singular vectors without trivial solution. |
eigen.values |
Eigenvalues without trivial solution. |
datname |
Name of the dataset. |
tab |
Table with imputed frequencies in case of missings. |
row.covariates |
Matrix with row covariates. |
col.covariates |
Matrix with column covariates. |
scaling |
Scaling Method. |
bdmat |
List of matrices with observed and fitted Benzecri distances for rows and columns. |
rmse |
Root mean squared error of Bezencri distances (rows and columns). |
row.acov |
Covariance matrix for row scores. |
col.acov |
Covariance matrix for column scores. |
cancoef |
List containing canonical coefficients (CCA only). |
sitescores |
List containing the site scores (CCA only). |
isetcor |
List containing the intraset correlations (CCA only). |
Jan de Leeuw, Patrick Mair
de Leeuw, J., & Mair, P. (2007). Simple and canonical correspondence analysis using the R package anacor. Preprint available at http://gifi.stat.ucla.edu/anacor.pdf
## simple CA on Tocher data, asymmetric coordinates data(tocher) res <- anacor(tocher, scaling = c("standard", "centroid")) res summary(res) ## 2- and 5-dimensional solutions for bitterling data, Benzecri scaling data(bitterling) res1 <- anacor(bitterling, ndim = 2, scaling = c("Benzecri", "Benzecri")) res2 <- anacor(bitterling, ndim = 5, scaling = c("Benzecri", "Benzecri")) res1 res2 ## Canonical CA on Maxwell data, Goodman scaling data(maxwell) res <- anacor(maxwell$table, row.covariates = maxwell$row.covariates, scaling = c("Goodman", "Goodman")) res summary(res)