homals {homals} | R Documentation |
This function performs a homogeneity analysis, aka a multiple correspondence analysis, but with many additional options. Variables can be grouped into sets, in order to emulate regression analysis and canonical analysis. For each variable there are, in addition, rank constraints on the category quantifications (or transformations) and level constraints (which allows one to treat a variable as nominal, ordinal, or numerical).
homals(dframe, sets = 0, ndim = 2, active = TRUE, rank = ndim, level = "nominal", eps1 = 1e-06, eps2 = 1e-06, itermax = 100)
dframe |
Data in data-frame. |
sets |
List of vectors of indices. |
ndim |
Number of dimensions to be extracted. |
active |
Which variables are active for computation (TRUE means all) |
rank |
Which quantification ranks. Default is number of dimensions ndim |
level |
Which quantification levels. Possible values are "nominal" ,
"ordinal" , "numerical" , and "polynomial" which can be defined as single
character (if all variable are of the same level) or as vector which length corresponds to the
number of variables. |
eps1 |
Iteration precision eigenvalues. |
eps2 |
Iteration precision eigenvectors. |
itermax |
Maximum number of iterations. |
The general idea of homogeneity analysis is to make a joint plot in p-space of all objects (or individuals) and the categories of all variables. The technique, in its most simple form, makes the graph plot in such a way that the sum of squares of the length of the nm lines is a small as possible, subject to a normalization of the object scores (their n x p coordinate matrix must be orthonormal).
Rank constraints require the category quantifications of the categories of a variable to lie in a subspace of p-space. Requiring rank equal to one for all variables reduces homogeneity analysis to principal component analysis (with optimal scaling of the variables).
Sets of variables are incorporated by using additivity restrictions on the category quantifications (i.e. we code the variables within a set interactively, but then use quantifications based on main effects only).
By combining the various types of restrictions we obtain far-reaching generalizations of principal component analysis, canonical analysis, discriminant analysis and regression analysis.
Returns an object of class "homals"
.
datname |
Name of the data file. |
dframe |
Data file. |
ndim |
Number of dimensions. |
niter |
Number of iterations. |
level |
Vector with variable levels. |
eigenvalues |
Final eigenvalues. |
loss |
Value of the loss function. |
rank.vec |
Vector with ranks for each variable. |
scores |
Matrix with object scores on single dimension. |
rank.cat |
List of rank restriced category quantifications. |
cat.centroids |
List of category centroids. |
cat.loadings |
List of category loadings. |
low.rank |
List of lower rank quantifications. |
Jan de Leeuw, Patrick Mair
Gifi, A. (1990). Nonlinear Multivariate Analysis. New York: Wiley.
data(galo) ##simple homals 2D-homals solution (School not active) res <- homals(galo, active = c(rep(TRUE, 4), FALSE)) ##predict IQ res <- homals(galo, active = c(rep(TRUE, 4), FALSE), sets = list(c(1,3,4),2,5)) ##Single ranks for each variable (non-linear PCA) res <- homals(galo, active = c(rep(TRUE, 4), FALSE), sets = list(c(1,3,4),2,5)) ##Nonlinear canonical correlation (2 sets of variables) res <- homals(galo, active = c(rep(TRUE, 4), FALSE), sets = list(c(1,2),c(3,4),5)) ##regression (numerical) data(neumann) res <- homals(neumann, sets = list(3, 1:2), level = "numerical", rank = 1) ##regression (monotone) res <- homals(neumann, sets = list(3, 1:2), level = "ordinal", rank = 1)