homals | R Documentation |
Fits a multiple correspondence analysis (MCA). The default is to take each input variable as nominal. Through restrictions on the transformations (ordinal in conjunction with splines) various generalizations of MCA can be achieved.
homals(data, ndim = 2, levels = "nominal", ordinal, knots, ties = "s", degrees = -1, missing = "s", normobj.z = TRUE, active = TRUE, itmax = 1000, eps = 1e-6, verbose = FALSE)
data |
Input data frame: n observations, m variables |
ndim |
Number of dimensions to be computed |
levels |
A vector of length m denoting basic scale levels ( |
ordinal |
If knots are specified manually, a boolean vector of length m denotes which variables should be ordinally restricted or not (see details) |
knots |
Scale levels can be specified manually using splines (see |
ties |
How ties should be handled: primary ( |
degrees |
Spline degrees. If different degrees should be used across variables, a vector of length m can be specified. The default value of -1 indicates nominal scale level (overrides the ordinal argument). |
missing |
How missing values should be handled: multiple ( |
active |
Which variables should be active or inactive (also as vector of length m) |
normobj.z |
If |
itmax |
Maximum number of iterations |
eps |
Convergence criterion |
verbose |
Iteration printout |
The measurement (or scale) levels of the variables are incorporated via spline transformations. If the user only needs simple scale levels like nominal, ordinal, and metric, a corresponding vector can be specified in the levels
argument without setting knots
and ordinal
. The corresponding spline transformations (unrestricted, monotone, and linear) are then created internally. If all scale level transformations are the same, ordinal
can be a single value. For more advanced transformations such as polynomial or more flexible splines, the knots
and ordinal
arguments need to be specified instead of levels
.
transform |
Optimally transformed scores |
rhat |
Induced correlation matrix |
evals |
Eigenvalues of induced correlation matrix |
objectscores |
Object scores (rows) |
scoremat |
Optimally scaled data matrix (first dimension) |
quantifications |
Category quantifications |
dmeasures |
Discimination matrices |
lambda |
Average discrimination matrix |
weights |
Component weights |
loadings |
Component loadings |
ntel |
Number of iterations |
f |
Loss function value |
data |
Original data frame |
datanum |
Numerical data frame |
ndim |
Number of extracted dimensions |
call |
Function call |
Gifi, A. (1990). Nonlinear Multivariate Analysis. New York: Wiley.
De Leeuw, J., Mair, P., Groenen, P. J. F. (2017). Multivariate Analysis with Optimal Scaling.
princals
, plot.homals
## multiple CA fithart <- homals(hartigan) fithart summary(fithart)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.