It starts with defining a robust location and scatter (based on Ma & Genton (2000): Highly robust estimation of the autocovariance function).
clustering_with_robust_distances(g, number_of_groups, Y)numeric vector with the new clustering, now including class zero adjustments
Vector with group membership for all individuals
number of groups
Y: the panel data of interest