Skip to content
Prev 363375 / 398502 Next

Need help with use of ROCK algorithm in R for binary data

You should really go to the help page for the function rockCluster() and run the first example and study the output.  It should become clear that what you are calling the <NA> cluster is not a cluster at all.  It is an indicator of which objects *did not* cluster with any other objects ). 

In addition, you state you have only four objects.  This is confusing since you have a column in your data  named 'objects' which implies that you have 6 objects (and that is how many objects are in your cluster results).

The function, fitted() should be used with the data you are clustering.   If you want to "predict" what clusters NEW data would fall into, then use predict().  It is not surprising that predict() used on the original data would predict the fitted results.


Dan

Daniel Nordlund, PhD
Research and Data Analysis Division
Services & Enterprise Support Administration
Washington State Department of Social and Health Services