Computes a robust version of the Gower distance using the RelMS method for mixed-type data (continuous, binary, categorical). Continuous variables are handled via a robust Mahalanobis distance using a supplied robust covariance matrix. Binary and categorical variables are transformed into distances via similarity coefficients and combined using the RelMS approach.
robust_RelMS(data, w, p, robust_cov)A numeric matrix of squared robust distances normalized by geometric variability.
Numeric matrix or data frame with all variables combined.
Numeric vector of weights for each observation. Will be normalized internally.
Integer vector of length 3: c(#cont, #binary, #categorical).
Robust covariance matrix for continuous variables.
The function computes distances separately for continuous, binary, and categorical variables, then applies the RelMS combination procedure. Continuous distances are Mahalanobis distances, categorical distances use a matching coefficient, and binary distances use a modified similarity coefficient. Eigen decomposition is used to compute the square root matrices needed in the RelMS combination.