For this example, we return to the USA states violent crime data example. Recall that TWOSTEP CLUSTER offers an automatic method for selecting the number of clusters, as well as a Likelihood distance measure. We will run it to show some of the visuals in the model viewer output.
The approach here is to:
- First run TWOSTEP CLUSTER in automatic mode to identify a tentative number of clusters.
- Then run TWOSTEP CLUSTER again with a specified number of clusters.
Here is the SPSS code for the first run:
TWOSTEP CLUSTER /CONTINUOUS VARIABLES=MurderR RRapeR RobberyR AssaultR BurglaryR LarcenyR VehicleTheftR /DISTANCE Likelihood /NUMCLUSTERS AUTO 15 BIC /HANDLENOISE 0 /MEMALLOCATE 64 /CRITERIA INITHRESHOLD(0) MXBRANCH(8) ...