Segments - Save Variable(s) - Cluster Membership
Jump to navigation
Jump to search
Create a new variable that allocates cases to the most similar cluster (e.g., people to segments) in an output generated by K-Means Cluster Analysis
Creates a new variable that allocates cases to the most similar cluster (e.g., people to segments) in an output generated by using the function Create > Segments > K-Means Cluster Analysis . Observations with missing values in the predictors are not predicted.
To run this script, the setting Inputs > Output should be set to Means.
Example
The script produces a SUMMARY table with the new variable (each category corresponds to a cluster):
Code
includeWeb("QScript R Output Functions");
main();
function main() {
saveVariables("Segment/Cluster memberships", "K-means Cluster Analysis", "predict(", ", use.names = TRUE)", "Pick One", null, "memb", "KMeans");
}
See Also
Further reading: Market Segmentation Software