Transcription of cluster — Introduction to cluster-analysis commands
1 Introduction to cluster - analysis commandsSyntaxDescriptionRemarks and examplesReferencesAlso seeSyntaxCluster analysis of analysis of a dissimilarity s cluster - analysis routines provide several hierarchical and partition clustering methods,postclustering summarization methods, and cluster -management tools. This entry presents an overviewof cluster analysis , theclusterandclustermatcommands (also see [MV]clustermat), as wellas Stata s cluster - analysis management tools. The hierarchical clustering methods may be applied tothe data by using theclustercommand or to a user-supplied dissimilarity matrix by using has the followingsubcommands, which are detailed in their respectivemanual methods for observationskmeans[MV] cluster kmeans and kmediansKmeans cluster analysiskmedians[MV] cluster kmeans and kmediansKmedians cluster analysisHierarchical clustering methods for observationssinglelinkage[MV] cluster linkageSingle-linkage cluster analysisaveragelinkage[MV] cluster linkageAverage-linkage cluster analysiscompletelinkage[MV]
2 cluster linkageComplete-linkage cluster analysiswaveragelinkage[MV] cluster linkageWeighted-average linkage clusteranalysismedianlinkage[MV] cluster linkageMedian-linkage cluster analysiscentroidlinkage[MV] cluster linkageCentroid-linkage cluster analysiswardslinkage[MV] cluster linkageWard s linkage cluster analysisPostclustering commandsstop[MV] cluster stopCluster- analysis stopping rulesdendrogram[MV] cluster dendrogramDendrograms for hierarchicalcluster analysisgenerate[MV] cluster generateGenerate summary or groupingvariables from a cluster analysis12 cluster Introduction to cluster - analysis commandsUser utilitiesnotes[MV] cluster notesPlace notes in cluster analysisdir[MV] cluster utilityDirectory list of cluster analyseslist[MV] cluster utilityList cluster analysesdrop[MV] cluster utilityDrop cluster analysesuse[MV] cluster utilityMark cluster analysis as most recentonerename[MV] cluster utilityRename cluster analysesrenamevar[MV] cluster utilityRename cluster - analysis variablesProgrammer utilities[MV] cluster programming subroutinesAdd cluster - analysis routinesquery[MV] cluster programming utilitiesObtain cluster - analysis attributesset[MV] cluster programming utilitiesSet cluster - analysis attributesdelete[MV]
3 cluster programming utilitiesDelete cluster - analysis attributesparsedistance[MV] cluster programming utilitiesParse (dis)similarity measurenamesmeasures[MV] cluster programming utilitiesCompute (dis)similarity measuresTheclustermatcommand has the followingsubcommands, which are detailed along with therelatedclustercommand manual entries. Also see [MV] clustering methods for matricessinglelinkage[MV] cluster linkageSingle-linkage cluster analysisaveragelinkage[MV] cluster linkageAverage-linkage cluster analysiscompletelinkage[MV] cluster linkageComplete-linkage cluster analysiswaveragelinkage[MV] cluster linkageWeighted-average linkage clusteranalysismedianlinkage[MV] cluster linkageMedian-linkage cluster analysiscentroidlinkage[MV] cluster linkageCentroid-linkage cluster analysiswardslinkage[MV] cluster linkageWard s linkage cluster analysisAlso, theclustermat stoppostclustering command has syntax similar to that of theclusterstopcommand; see [MV] cluster stop.
4 For the remaining postclustering commands and user utilities,you may specify eitherclusterorclustermat it does not matter you are new to Stata s cluster - analysis commands , we recommend that you first read this entryand then read the following:[MV]measureoptionOption for similarity and dissimilarity measures[MV]clustermatCluster analysis of a dissimilarity matrix[MV] cluster kmeans and kmediansKmeans and kmedians cluster analysis [MV] cluster linkageHierarchical cluster analysis [MV] cluster dendrogramDendrograms for hierarchical cluster analysis [MV] cluster stopCluster- analysis stopping rules[MV] cluster generateGenerate summary or grouping variables from acluster analysiscluster Introduction to cluster - analysis commands 3 Remarks and are presented under the following headings.
5 Introduction to cluster analysisStata s cluster - analysis systemData transformations and variable selectionSimilarity and dissimilarity measuresPartition cluster - analysis methodsHierarchical cluster - analysis methodsAgglomerative methodsLance and Williams recurrence formulaDissimilarity transformations and the Lance and Williams formulaWarning concerning similarity or dissimilarity choiceSynonymsReversalsHierarchical cluster analysis applied to a dissimilarity matrixUser-supplied dissimilaritiesClustering variables instead of observationsPostclustering commandsCluster-management toolsIntroduction to cluster analysisCluster analysis attempts to determine the natural groupings (or clusters) of observations.
6 Sometimesthis process is called classification , but this term is used by others to mean discriminant analysis ,which is related but is not the same; see [MV]discrim. To avoid confusion, we will use clusteranalysis or clustering when referring to finding groups in data. Defining cluster analysis is difficult(maybe impossible). Kaufman and Rousseeuw (1990) start their book by saying, cluster analysisis the art of finding groups in data. Everitt et al. (2011, 7) use the terms cluster , group , and class and say, concerning a formal definition for these terms, In fact it turns out that such formaldefinition is not only difficult but may even be misplaced.
7 Everitt et al. (2011) and Gordon (1999) provide examples of the use of cluster analysis , suchas in refining or redefining diagnostic categories in psychiatry, detecting similarities in artifacts byarchaeologists to study the spatial distribution of artifact types, discovering hierarchical relationshipsin taxonomy, and identifying sets of similar cities so that one city from each class can be sampled in amarket research task. Also, the activity now called data mining relies extensively on view cluster analysis as an exploratory data- analysis technique. According to Everitt, Manycluster- analysis techniques have taken their place alongside other exploratory data- analysis techniquesas tools of the applied statistician.
8 The term exploratory is important here because it explains thelargely absent p-value , ubiquitous in many other areas of methods areintended largely for generating rather than testing hypotheses (1993, 10).Although some have said that there are as many cluster - analysis methods as there are peopleperforming cluster analysis . This is a gross understatement! There exist infinitely more ways toperform a cluster analysis than people who perform are several general types of cluster - analysis methods, each having many specific , most cluster - analysis methods allow a variety of distance measures for determining the similarityor dissimilarity between observations.
9 Some of the measures do not meet the requirements to becalled a distance metric, so we use the more general term dissimilarity measure in place of measures may be used in place of dissimilarity measures. There are an infinite numberof similarity and dissimilarity measures. For instance, there are an infinite number of Minkowski4 cluster Introduction to cluster - analysis commandsdistance metrics, with the familiar Euclidean, absolute-value, and maximum-value distances beingspecial addition to cluster method and dissimilarity measure choice, if you are performing a clusteranalysis, you might decide to perform data transformations and/or variable selection before you might need to determine how many clusters there really are in the data, which you cando using stopping rules.
10 There is a surprisingly large number of stopping rules mentioned in theliterature. For example, Milligan and Cooper (1985) compare 30 different stopping at all these choices, you can see why there are more cluster - analysis methods than peopleperforming cluster s cluster - analysis systemStata sclusterandclustermatcommands were designed to allow you to keep track of the variouscluster analyses performed on your data. The main clustering subcommands singlelinkage,averagelinkage,completelin kage,waveragelinkage,medianlinkage,centr oidlinkage,wardslinkage(see [MV] cluster linkage),kmeans, andkmedians(see [MV] cluster kmeans andkmedians) create named Stata cluster objects that keep track of the variables these methods createand hold other identifying information for the cluster analysis .