Clustering and dimension reduction for mixed variables