homals: Multiple Correspondence Analysis (HOMALS).

homalsR Documentation

Multiple Correspondence Analysis (HOMALS).

Description

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.

Usage

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)

Arguments

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 ("nominal", "ordinal", "metric"; see details

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 knotsGifi). If knots is set, this overrides level (see details)

ties

How ties should be handled: primary ("p"), secondary ("s"), or tertiary ("t")

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 ("m"), single ("s"), or average ("a")

active

Which variables should be active or inactive (also as vector of length m)

normobj.z

If TRUE, object scores are z-scores, if FALSE, they are restriction to SS of 1.

itmax

Maximum number of iterations

eps

Convergence criterion

verbose

Iteration printout

Details

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.

Value

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

References

Gifi, A. (1990). Nonlinear Multivariate Analysis. New York: Wiley.

De Leeuw, J., Mair, P., Groenen, P. J. F. (2017). Multivariate Analysis with Optimal Scaling.

See Also

princals, plot.homals

Examples

## multiple CA 
fithart <- homals(hartigan)
fithart
summary(fithart)

Gifi documentation built on Sept. 28, 2022, 3 a.m.

Related to homals in Gifi...