I am trying to run the package NbClust on my data (100 rows x 130 columns) to determine the number of clusters I should choose, but I keep getting this error if I try to apply it to the full data set:
> nc <- NbClust(mydata, distance="euclidean", min.nc=2, max.nc=99, method="ward",
index="duda")
[1] "There are only 100 nonmissing observations out of a possible 100 observations."
Error in NbClust(mydata, distance = "euclidean", min.nc = 2, max.nc = 99, :
The TSS matrix is indefinite. There must be too many missing values. The index cannot be calculated.
When I apply the method to a 100x80 matrix, it does produce the required output (100x100 also gave me an error message, but a different one). However, obviously, I want to apply this method to the whole dataset. FYI - creating the distance matrix, and clustering with Ward's Method was both no problem. Both the distance matrix and the dendrogram were produced…