mds_test function

Test optimal number of MDS dimensions.