Thank you! It worked. However, I received an error message when I tried inputting a variable that had 3 groups. Is there any way to solve this? Or would the variable have to consist of 2 groups?

Error code:

Error in solve.default(Zmcd$cov) :

Lapack routine dgesv: system is exactly singular: U[5,5] = 0

In addition: Warning message:

In covMcd(data, cor = FALSE, control = control) :

The 1001-th order statistic of the absolute deviation of variable 5 is zero.

There are 1077 observations (in the entire dataset of 1177 obs.) lying on the hyperplane with equation a_1*(x_i1 -

m_1) + ... + a_p*(x_ip - m_p) = 0 with (m_1, ..., m_p) the mean of these observations and coefficients a_i from the

vector a <- c(0, 0, 0, 0, 1)