

{"id":13586,"date":"2018-04-17T06:08:17","date_gmt":"2018-04-17T06:08:17","guid":{"rendered":"https:\/\/data-flair.training\/blogs\/?p=13586"},"modified":"2021-12-03T10:35:32","modified_gmt":"2021-12-03T05:05:32","slug":"stat-cluster-analysis","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/stat-cluster-analysis\/","title":{"rendered":"Learn 7 Simple SAS\/STAT Cluster Analysis Procedures"},"content":{"rendered":"<p>We looked at <strong><a href=\"https:\/\/data-flair.training\/blogs\/categorical-data-analysis\/\">SAS\/ STAT categorical data analysis<\/a><\/strong> in the previous tutorial, today we will be looking at SAS\/STAT Cluster analysis and how Cluster Analysis is used in SAS\/STAT for computing clusters between variables of our data.<\/p>\n<p>Our focus here will be to understand different procedures that can be used for Cluster analysis: PROC ACECLUS, PROC CLUSTER, PROC DISTANCE, PROC VARCLUS, PROC FASTCLUS<br \/>\n, PROC MODECLUS, and PROC TREE with syntax and examples.<br \/>\nSo, let&#8217;s start with SAS\/STAT Cluster Analysis.<\/p>\n<div id=\"attachment_13610\" style=\"width: 1210px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/SAS-STAT-CLUSTER-ANALYSIS-01.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-13610\" class=\"wp-image-13610 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/SAS-STAT-CLUSTER-ANALYSIS-01.jpg\" alt=\"SAS\/STAT Cluster Analysis\" width=\"1200\" height=\"628\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/SAS-STAT-CLUSTER-ANALYSIS-01.jpg 1200w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/SAS-STAT-CLUSTER-ANALYSIS-01-150x79.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/SAS-STAT-CLUSTER-ANALYSIS-01-300x157.jpg 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/SAS-STAT-CLUSTER-ANALYSIS-01-768x402.jpg 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/SAS-STAT-CLUSTER-ANALYSIS-01-1024x536.jpg 1024w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/a><p id=\"caption-attachment-13610\" class=\"wp-caption-text\">SAS\/STAT Cluster Analysis<\/p><\/div>\n<h3>SAS\/STAT Cluster Analysis Procedure<\/h3>\n<p>SAS\/STAT Cluster Analysis is a statistical classification technique in which cases, data, or objects (events, people, things, etc.) are sub-divided into groups (clusters) such that the items in a cluster are very similar (but not identical) to one another and very different from the items in other clusters.<\/p>\n<p>Cluster analysis is a discovery tool that reveals associations, patterns, relationships, and structures in masses of data.<br \/>\n<strong><a href=\"https:\/\/data-flair.training\/blogs\/stat-software\/\">Let&#8217;s Explore What is SAS\/STAT Software in detail\u00a0<\/a><\/strong><br \/>\nA cluster is a collection of data objects that are very similar to one another nut different from other clusters. It finds its applications in the following fields.<\/p>\n<ul>\n<li><strong>Marketing:<\/strong> Help marketers discover distinct groups in their customer bases, and then use this knowledge to develop targeted marketing programs<\/li>\n<li><strong>City-planning:<\/strong> Identifying groups of houses according to their house type, value, and geographical location<\/li>\n<li><strong>Earth-quake studies:<\/strong> Observed earthquake epicenters should be clustered along continent faults<\/li>\n<\/ul>\n<div id=\"attachment_13611\" style=\"width: 486px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/sample-image-of-cluster-analysis.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-13611\" class=\"wp-image-13611 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/sample-image-of-cluster-analysis.png\" alt=\"SAS\/STAT Cluster Analysis\" width=\"476\" height=\"326\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/sample-image-of-cluster-analysis.png 476w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/sample-image-of-cluster-analysis-150x103.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/sample-image-of-cluster-analysis-300x205.png 300w\" sizes=\"auto, (max-width: 476px) 100vw, 476px\" \/><\/a><p id=\"caption-attachment-13611\" class=\"wp-caption-text\">SAS\/STAT Cluster Analysis<\/p><\/div>\n<h3>Various Procedures for Cluster Analysis in SAS\/STAT<\/h3>\n<p>SAS\/STAT Cluster Analysis uses the following procedures for a sample data. Each procedure has a different syntax and is used with different type of data in different contexts. Let us explore each one of these.<br \/>\n<strong><a href=\"https:\/\/data-flair.training\/blogs\/stat-software-features\/\">Read About SAS\/STAT Software Features<\/a><\/strong><\/p>\n<h4>a. PROC ACECLUS<\/h4>\n<p>The PROC ACECLUS procedure in SAS\/STAT Cluster Analysis is useful for processing data prior to the actual cluster analysis. In this, it attempts to estimate the pooled within-cluster covariance matrix from coordinate data without knowledge of the number or the membership of the clusters.<\/p>\n<p>PROC ACECLUS outputs a data set containing canonical variable scores to be used in the SAS\/STAT cluster analysis.<br \/>\n<strong>PROC ACECLUS\u00a0Syntax-<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\">PROC ACECLUS\u00a0DATASET &lt;OPTIONS&gt;;\r\nVAR &lt;variable&gt;;<\/pre>\n<p><strong>PROC ACECLUS Example-<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\">title'unclustered data';\r\nproc sgplot data=sashelp.cars;\r\n\u00a0\u00a0 scatter y=make x=enginesize;\r\nrun;<\/pre>\n<p>The plot displayed below shows that the clusters that comprise these data might be poorly separated and elongated. Data with poorly separated or elongated clusters must be transformed.<br \/>\n<strong><a href=\"https:\/\/data-flair.training\/blogs\/stat-software-advantages\/\">Let&#8217;s Discuss Advantages &amp; Disadvantages of\u00a0SAS\/STAT Software\u00a0<\/a><\/strong><\/p>\n<div id=\"attachment_13642\" style=\"width: 424px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/2018-04-16.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-13642\" class=\"wp-image-13642 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/2018-04-16.png\" alt=\"SAS\/STAT Cluster Analysis - PROC ACECLUS\" width=\"414\" height=\"314\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/2018-04-16.png 414w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/2018-04-16-150x114.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/2018-04-16-300x228.png 300w\" sizes=\"auto, (max-width: 414px) 100vw, 414px\" \/><\/a><p id=\"caption-attachment-13642\" class=\"wp-caption-text\">SAS\/STAT Cluster Analysis &#8211; PROC ACECLUS<\/p><\/div>\n<pre class=\"EnlighterJSRAW\">proc aceclus data=sashelp.cars\u00a0 proportion=.06;\r\n\u00a0\u00a0 var horsepower enginesize msrp ;\r\nrun;\u00a0\r\nproc sgplot data=sashelp.cars;\r\n\u00a0\u00a0 scatter y=make x=enginesize \/ group=msrp;\r\n\u00a0\u00a0 keylegend \/ title=\"Clustered data\";\r\nrun;<\/pre>\n<p>The PROPORTION= option specifies that approximately 6 percent of the pairs are included in the estimation of the within-cluster covariance matrix.<br \/>\nThe VAR statement specifies that the variables horsepower, engine size, and msrp are used in computing the canonical variables. The clustered data looks like the one shown below.<strong>\u00a0\u00a0\u00a0\u00a0\u00a0<\/strong><br \/>\n<strong><a href=\"https:\/\/data-flair.training\/blogs\/sas-stat-anova\/\">\u00a0Read about &#8211; 8 Procedures for Calculating Analysis of Variance<\/a><\/strong><\/p>\n<div id=\"attachment_13613\" style=\"width: 667px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/proc-aceclus-output-4.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-13613\" class=\"wp-image-13613 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/proc-aceclus-output-4.png\" alt=\"SAS\/STAT Cluster Analysis\" width=\"657\" height=\"498\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/proc-aceclus-output-4.png 657w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/proc-aceclus-output-4-150x114.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/proc-aceclus-output-4-300x227.png 300w\" sizes=\"auto, (max-width: 657px) 100vw, 657px\" \/><\/a><p id=\"caption-attachment-13613\" class=\"wp-caption-text\">SAS\/STAT Cluster Analysis -PROC ACECLUS<\/p><\/div>\n<div id=\"attachment_13617\" style=\"width: 409px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/proc-aceclus-output-2.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-13617\" class=\"wp-image-13617 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/proc-aceclus-output-2.png\" alt=\"SAS\/STAT Cluster Analysis\" width=\"399\" height=\"625\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/proc-aceclus-output-2.png 399w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/proc-aceclus-output-2-96x150.png 96w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/proc-aceclus-output-2-192x300.png 192w\" sizes=\"auto, (max-width: 399px) 100vw, 399px\" \/><\/a><p id=\"caption-attachment-13617\" class=\"wp-caption-text\">SAS\/STAT Cluster Analysis-\u00a0 PROC ACECLUS<\/p><\/div>\n<div id=\"attachment_13618\" style=\"width: 341px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/proc-aceclus-output-3.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-13618\" class=\"wp-image-13618 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/proc-aceclus-output-3.png\" alt=\"SAS\/STAT Cluster Analysis\" width=\"331\" height=\"514\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/proc-aceclus-output-3.png 331w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/proc-aceclus-output-3-97x150.png 97w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/proc-aceclus-output-3-193x300.png 193w\" sizes=\"auto, (max-width: 331px) 100vw, 331px\" \/><\/a><p id=\"caption-attachment-13618\" class=\"wp-caption-text\">SAS\/STAT Cluster Analysis &#8211; PROC ACECLUS<\/p><\/div>\n<h4>b. PROC CLUSTER<\/h4>\n<p>The PROC CLUSTER procedure in SAS\/STAT performs hierarchical clustering of observations using one of the eleven methods applied to coordinate data or distance data.\u00a0SAS\/STAT clustering methods are: average linkage, the centroid method, complete linkage, density linkage and many more.<\/p>\n<p>PROC CLUSTER displays a history of the clustering process, showing statistics useful for estimating the number of clusters in the population from which the data are sampled.<br \/>\n<strong><a href=\"https:\/\/data-flair.training\/blogs\/stat-bayesian-analysis\/\">Let&#8217;s Look at 6 SAS\/STAT Bayesian Analysis Procedures You Must Know<\/a><\/strong><br \/>\n<strong>PROC CLUSTER Syntax-<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\">PROC CLUSTER dataset &lt;OPTIONS&gt;;\r\nVar &lt;VARIABLES&gt;;<\/pre>\n<p>Only the PROC CLUSTER statement is required statement. Usually, only the VAR statement and sometimes the ID and COPY statements are needed in addition to the PROC CLUSTER statement<br \/>\n<strong>PROC CLUSTER\u00a0Example-<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\">ods graphics on;\r\nproc cluster data=SASHELP.CARS method=ward ccc pseudo PRINT=20 plots=den(height=rsq);\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 var Wheelbase;\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 id make;\r\nrun;\u00a0\r\nproc sgplot data=sashelp.cars;\r\n\u00a0\u00a0 scatter y=make x=wheelbase \/ group=origin;\r\nrun;<\/pre>\n<p>The CCC option displays the cubic clustering criterion, and the PSEUDO option displays pseudo F\u00a0and\u00a0t<sup>2<\/sup>\u00a0statistics. The PRINT=20 option displays only the last 20 generations of the cluster history.<strong>\u00a0<\/strong><\/p>\n<div id=\"attachment_13620\" style=\"width: 400px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/proc-cluster-output_1.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-13620\" class=\"wp-image-13620 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/proc-cluster-output_1.png\" alt=\"SAS\/STAT Cluster Analysis\" width=\"390\" height=\"199\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/proc-cluster-output_1.png 390w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/proc-cluster-output_1-150x77.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/proc-cluster-output_1-300x153.png 300w\" sizes=\"auto, (max-width: 390px) 100vw, 390px\" \/><\/a><p id=\"caption-attachment-13620\" class=\"wp-caption-text\">SAS\/STAT Cluster Analysis &#8211; PROC CLUSTER<\/p><\/div>\n<div id=\"attachment_13621\" style=\"width: 624px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/proc-cluster-output-2.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-13621\" class=\"wp-image-13621 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/proc-cluster-output-2.png\" alt=\"SAS\/STAT Cluster Analysis\" width=\"614\" height=\"463\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/proc-cluster-output-2.png 614w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/proc-cluster-output-2-150x113.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/proc-cluster-output-2-300x226.png 300w\" sizes=\"auto, (max-width: 614px) 100vw, 614px\" \/><\/a><p id=\"caption-attachment-13621\" class=\"wp-caption-text\">SAS\/STAT Cluster Analysis &#8211; PROC CLUSTER<\/p><\/div>\n<div id=\"attachment_13622\" style=\"width: 669px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/proc-cluster-output-3.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-13622\" class=\"wp-image-13622 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/proc-cluster-output-3.png\" alt=\"SAS\/STAT Cluster Analysis\" width=\"659\" height=\"500\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/proc-cluster-output-3.png 659w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/proc-cluster-output-3-150x114.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/proc-cluster-output-3-300x228.png 300w\" sizes=\"auto, (max-width: 659px) 100vw, 659px\" \/><\/a><p id=\"caption-attachment-13622\" class=\"wp-caption-text\">SAS\/STAT Cluster Analysis &#8211; PROC CLUSTER<\/p><\/div>\n<div id=\"attachment_13623\" style=\"width: 669px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/proc-cluster-output-4.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-13623\" class=\"wp-image-13623 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/proc-cluster-output-4.png\" alt=\"SAS\/STAT Cluster Analysis\" width=\"659\" height=\"495\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/proc-cluster-output-4.png 659w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/proc-cluster-output-4-150x113.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/proc-cluster-output-4-300x225.png 300w\" sizes=\"auto, (max-width: 659px) 100vw, 659px\" \/><\/a><p id=\"caption-attachment-13623\" class=\"wp-caption-text\">SAS\/STAT Cluster Analysis &#8211; PROC CLUSTER<\/p><\/div>\n<h4>c. PROC DISTANCE<\/h4>\n<p>The PROC DISTANCE procedure in SAS\/STAT computes various measures of distance, dissimilarity, or similarity between the rows (observations) of an input<a href=\"https:\/\/data-flair.training\/blogs\/sas-data-set\/\"><strong> SAS data set<\/strong><\/a>, which can contain numeric or character variables, or both.<br \/>\n<strong>PROC DISTANCE Syntax-<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\">PROC distance \u00a0dataset method=OPTIONS;\r\n\u00a0\u00a0\u00a0\u00a0 Var &lt;measurement levels&gt; &lt; variable&gt;;<\/pre>\n<p><strong>PROC DISTANCE\u00a0Example-<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\">title'proc distance procedure';\r\nproc distance data=SASHELP.CLASS method=euclid out=distance;\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 var interval(Age \/ std=std);\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 id name;\r\nrun;\r\nproc print data=distance;\r\nRUN;<\/pre>\n<p><strong><a href=\"https:\/\/data-flair.training\/blogs\/sas-pie-chart\/\">Let&#8217;s Create SAS Pie Chart<\/a><\/strong><br \/>\nHere, the METHOD=EUCLID option requests that Euclidean distances (which is the default) should be computed.<br \/>\nThe VAR statement lists the <strong><a href=\"https:\/\/data-flair.training\/blogs\/sas-variable\/\">variable<\/a><\/strong> age along with their measurement level to be used in SAS\/STAT Cluster analysis. \u00a0An interval level of measurement is assigned to the age variable.<\/p>\n<div id=\"attachment_13624\" style=\"width: 1085px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/PROC-DISTANCE-OUTPUT-1.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-13624\" class=\"wp-image-13624 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/PROC-DISTANCE-OUTPUT-1.png\" alt=\"SAS\/STAT Cluster Analysis\" width=\"1075\" height=\"473\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/PROC-DISTANCE-OUTPUT-1.png 1075w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/PROC-DISTANCE-OUTPUT-1-150x66.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/PROC-DISTANCE-OUTPUT-1-300x132.png 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/PROC-DISTANCE-OUTPUT-1-768x338.png 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/PROC-DISTANCE-OUTPUT-1-1024x451.png 1024w\" sizes=\"auto, (max-width: 1075px) 100vw, 1075px\" \/><\/a><p id=\"caption-attachment-13624\" class=\"wp-caption-text\">SAS\/STAT Cluster Analysis &#8211; PROC DISTANCE<\/p><\/div>\n<h4>d. PROC VARCLUS<\/h4>\n<p>The PROC VARCLUS procedure in SAS\/STAT performs clustering of variables, it divides a set of variables by hierarchical clustering. For example, a test might contain 50 items. PROC VARCLUS can be used to divide the items into, say, five clusters. Each cluster can then be treated as a subtest, with the subtest scores given by the cluster components.<br \/>\n<strong><a href=\"https:\/\/data-flair.training\/blogs\/sas-arithmetic-mean\/\">Let&#8217;s Discuss SAS Arithmetic Mean \u2013 PROC MEANS\u00a0<\/a><\/strong><br \/>\n<strong>Proc VARCLUS Syntax-<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\">PROC varclus dataset;\r\nVAR &lt;VARIABLE&gt;;<\/pre>\n<p><strong>Proc VARCLUS\u00a0Example-<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\">proc varclus data=SASHELP.IRIS MAXCLUSTERS=4;\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 var PetalWidth SepalWidth;\r\nrun;<\/pre>\n<p>The MAXCLUSTERS=4 option specifies that no more than four clusters be computed.<\/p>\n<div id=\"attachment_13625\" style=\"width: 442px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/PROC-VARCLUS-OUTPUT-1.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-13625\" class=\"wp-image-13625 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/PROC-VARCLUS-OUTPUT-1.png\" alt=\"SAS\/STAT Cluster Analysis\" width=\"432\" height=\"217\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/PROC-VARCLUS-OUTPUT-1.png 432w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/PROC-VARCLUS-OUTPUT-1-150x75.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/PROC-VARCLUS-OUTPUT-1-300x151.png 300w\" sizes=\"auto, (max-width: 432px) 100vw, 432px\" \/><\/a><p id=\"caption-attachment-13625\" class=\"wp-caption-text\">SAS\/STAT Cluster Analysis &#8211;\u00a0PROC VARCLUS<\/p><\/div>\n<div id=\"attachment_13626\" style=\"width: 399px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/PROC-VARCLUS-OUTPUT-2.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-13626\" class=\"wp-image-13626 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/PROC-VARCLUS-OUTPUT-2.png\" alt=\"SAS\/STAT Cluster Analysis\" width=\"389\" height=\"381\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/PROC-VARCLUS-OUTPUT-2.png 389w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/PROC-VARCLUS-OUTPUT-2-150x147.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/PROC-VARCLUS-OUTPUT-2-300x294.png 300w\" sizes=\"auto, (max-width: 389px) 100vw, 389px\" \/><\/a><p id=\"caption-attachment-13626\" class=\"wp-caption-text\">SAS\/STAT Cluster Analysis &#8211;\u00a0PROC VARCLUS<\/p><\/div>\n<div id=\"attachment_13627\" style=\"width: 490px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/PROC-VARCLUS-OUTPUT-3.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-13627\" class=\"wp-image-13627 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/PROC-VARCLUS-OUTPUT-3.png\" alt=\"SAS\/STAT Cluster Analysis\" width=\"480\" height=\"328\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/PROC-VARCLUS-OUTPUT-3.png 480w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/PROC-VARCLUS-OUTPUT-3-150x103.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/PROC-VARCLUS-OUTPUT-3-300x205.png 300w\" sizes=\"auto, (max-width: 480px) 100vw, 480px\" \/><\/a><p id=\"caption-attachment-13627\" class=\"wp-caption-text\">SAS\/STAT Cluster Analysis &#8211;\u00a0PROC VARCLUS<\/p><\/div>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/sas-iml-software\/\"><strong>Let&#8217;s Discuss One More SAS\u00a0Software &#8211; IML Software<\/strong><\/a><\/p>\n<h4>e. PROC FASTCLUS<\/h4>\n<p>The FASTCLUS SAS\/STAT cluster analysis procedure performs k-means clustering on the basis of distances computed from one or more variables. (numeric). PROC FASTCLUS is especially suitable for large data sets. By default, the FASTCLUS procedure uses Euclidean distances.<\/p>\n<p>This kind of clustering method is often called a\u00a0k<em>-means model<\/em>. The observations are divided into clusters such that every observation belongs to one and only one cluster.<br \/>\n<strong>PROC FASTCLUS Syntax-<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\">PROC FASTCLUS dataset;\r\n\u00a0\u00a0 Var &lt;variables&gt;;<\/pre>\n<p><strong>PROC FASTCLUS Example-<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\">title'the fastclus procedure';\r\nproc fastclus data=sashelp.cars maxclusters=20;\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 var EngineSize Cylinders;\r\nrun;<\/pre>\n<p>You need only the VAR statement in addition to the PROC FASTCLUS statement.<\/p>\n<div id=\"attachment_13628\" style=\"width: 322px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/proc-fastclus-output-1.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-13628\" class=\"wp-image-13628 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/proc-fastclus-output-1.png\" alt=\"SAS\/STAT Cluster Analysis\" width=\"312\" height=\"535\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/proc-fastclus-output-1.png 312w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/proc-fastclus-output-1-87x150.png 87w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/proc-fastclus-output-1-175x300.png 175w\" sizes=\"auto, (max-width: 312px) 100vw, 312px\" \/><\/a><p id=\"caption-attachment-13628\" class=\"wp-caption-text\">SAS\/STAT Cluster Analysis &#8211; PROC FASTCLUS<\/p><\/div>\n<div id=\"attachment_13629\" style=\"width: 287px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/proc-fastclus-output-4.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-13629\" class=\"wp-image-13629 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/proc-fastclus-output-4.png\" alt=\"SAS\/STAT Cluster Analysis\" width=\"277\" height=\"442\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/proc-fastclus-output-4.png 277w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/proc-fastclus-output-4-94x150.png 94w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/proc-fastclus-output-4-188x300.png 188w\" sizes=\"auto, (max-width: 277px) 100vw, 277px\" \/><\/a><p id=\"caption-attachment-13629\" class=\"wp-caption-text\">SAS\/STAT Cluster Analysis &#8211; PROC FASTCLUS<\/p><\/div>\n<div id=\"attachment_13630\" style=\"width: 356px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/proc-fastclus-output3.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-13630\" class=\"wp-image-13630 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/proc-fastclus-output3.png\" alt=\"SAS\/STAT Cluster Analysis\" width=\"346\" height=\"238\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/proc-fastclus-output3.png 346w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/proc-fastclus-output3-150x103.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/proc-fastclus-output3-300x206.png 300w\" sizes=\"auto, (max-width: 346px) 100vw, 346px\" \/><\/a><p id=\"caption-attachment-13630\" class=\"wp-caption-text\">SAS\/STAT Cluster Analysis &#8211; PROC FASTCLUS<\/p><\/div>\n<div id=\"attachment_13632\" style=\"width: 599px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/proc-fastclus-output-2.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-13632\" class=\"wp-image-13632 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/proc-fastclus-output-2.png\" alt=\"SAS\/STAT Cluster Analysis\" width=\"589\" height=\"475\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/proc-fastclus-output-2.png 589w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/proc-fastclus-output-2-150x121.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/proc-fastclus-output-2-300x242.png 300w\" sizes=\"auto, (max-width: 589px) 100vw, 589px\" \/><\/a><p id=\"caption-attachment-13632\" class=\"wp-caption-text\">SAS\/STAT Cluster Analysis &#8211; PROC FASTCLUS<\/p><\/div>\n<div id=\"attachment_13633\" style=\"width: 293px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/proc-fastclus-output-5.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-13633\" class=\"wp-image-13633 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/proc-fastclus-output-5.png\" alt=\"SAS\/STAT Cluster Analysis\" width=\"283\" height=\"465\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/proc-fastclus-output-5.png 283w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/proc-fastclus-output-5-91x150.png 91w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/proc-fastclus-output-5-183x300.png 183w\" sizes=\"auto, (max-width: 283px) 100vw, 283px\" \/><\/a><p id=\"caption-attachment-13633\" class=\"wp-caption-text\">SAS\/STAT Cluster Analysis &#8211; PROC FASTCLUS<\/p><\/div>\n<h4><span style=\"font-family: Georgia, Georgia, serif;font-weight: inherit\">f. PROC MODECLUS<\/span><\/h4>\n<p>The PROC MODECLUS procedure in SAS\/STAT performs clustering by implementing several clustering methods instead of one. You do not tell PROC MODECLUS how many clusters you want. Instead, you specify a\u00a0<em>smoothing parameter<\/em>\u00a0and, optionally, a significance level, and PROC MODECLUS determines the number of clusters.<br \/>\n<a href=\"https:\/\/data-flair.training\/blogs\/sas-interview-questions\/\"><strong>Let&#8217;s check your Knowledge with Top 30 SAS Interview Questions and Answers<\/strong><\/a><br \/>\n<strong>PROC MODECLUS Syntax-<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\">PROC MODECLUS\u00a0 dataset;\r\n\u00a0\u00a0 VAR &lt; VARIABLES&gt;;<\/pre>\n<p>The PROC PHREG and MODEL statements required statements.<br \/>\n<strong>PROC MODECLUS\u00a0Example-<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\">proc modeclus data=SASHELP.IRIS method=1 r=5 10 25 out=out;\r\nrun;\r\nproc sgplot;\r\n\u00a0\u00a0 scatter y=SEPALWIDTH x=SEPALLENGTH;\r\n\u00a0\u00a0 TITLE'UNCLUSTERED DATA';\r\nrun;<\/pre>\n<p>To obtain a cluster analysis in PROC MODECLUS, you must specify the METHOD= option; for most purposes, METHOD=1 recommended.<br \/>\nThe cluster analysis can perform with a list of radii (R=5 10 325).<\/p>\n<div id=\"attachment_13634\" style=\"width: 678px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/PROC-MODECLUS-OUTPUT-3.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-13634\" class=\"wp-image-13634 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/PROC-MODECLUS-OUTPUT-3.png\" alt=\"SAS\/STAT Cluster Analysis\" width=\"668\" height=\"513\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/PROC-MODECLUS-OUTPUT-3.png 668w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/PROC-MODECLUS-OUTPUT-3-150x115.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/PROC-MODECLUS-OUTPUT-3-300x230.png 300w\" sizes=\"auto, (max-width: 668px) 100vw, 668px\" \/><\/a><p id=\"caption-attachment-13634\" class=\"wp-caption-text\">SAS\/STAT Cluster Analysis &#8211;\u00a0PROC MODECLUS<\/p><\/div>\n<div id=\"attachment_13635\" style=\"width: 352px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/PROC-MODECLUS-OUTPUT-2.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-13635\" class=\"wp-image-13635 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/PROC-MODECLUS-OUTPUT-2.png\" alt=\"SAS\/STAT Cluster Analysis\" width=\"342\" height=\"317\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/PROC-MODECLUS-OUTPUT-2.png 342w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/PROC-MODECLUS-OUTPUT-2-150x139.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/PROC-MODECLUS-OUTPUT-2-300x278.png 300w\" sizes=\"auto, (max-width: 342px) 100vw, 342px\" \/><\/a><p id=\"caption-attachment-13635\" class=\"wp-caption-text\">SAS\/STAT Cluster Analysis &#8211;\u00a0PROC MODECLUS<\/p><\/div>\n<div id=\"attachment_13636\" style=\"width: 450px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/PROC-MODECLUS-OUTPUT-1.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-13636\" class=\"wp-image-13636 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/PROC-MODECLUS-OUTPUT-1.png\" alt=\"SAS\/STAT Cluster Analysis\" width=\"440\" height=\"583\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/PROC-MODECLUS-OUTPUT-1.png 440w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/PROC-MODECLUS-OUTPUT-1-113x150.png 113w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/PROC-MODECLUS-OUTPUT-1-226x300.png 226w\" sizes=\"auto, (max-width: 440px) 100vw, 440px\" \/><\/a><p id=\"caption-attachment-13636\" class=\"wp-caption-text\">SAS\/STAT Cluster Analysis &#8211;\u00a0PROC MODECLUS<\/p><\/div>\n<pre class=\"EnlighterJSRAW\">proc sgplot data=SASHELP.IRIS;\r\n\u00a0\u00a0 scatter y=SEPALWIDTH x=SEPALLENGTH \/ group=PETALLENGTH ;\r\n\u00a0 TITLE'CLUSTERED DATA';\r\nrun;<\/pre>\n<div id=\"attachment_13637\" style=\"width: 666px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/PROC-MODECLUS-OUTPUT-4.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-13637\" class=\"wp-image-13637 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/PROC-MODECLUS-OUTPUT-4.png\" alt=\"SAS\/STAT Cluster Analysis\" width=\"656\" height=\"501\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/PROC-MODECLUS-OUTPUT-4.png 656w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/PROC-MODECLUS-OUTPUT-4-150x115.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/PROC-MODECLUS-OUTPUT-4-300x229.png 300w\" sizes=\"auto, (max-width: 656px) 100vw, 656px\" \/><\/a><p id=\"caption-attachment-13637\" class=\"wp-caption-text\">SAS\/STAT Cluster Analysis- PROC MODECLUS<\/p><\/div>\n<p><strong><a href=\"https:\/\/data-flair.training\/blogs\/sas-chi-square-test\/\">Read About SAS Chi-Square Test \u2013 SAS PROC FREQ<\/a><\/strong><\/p>\n<h4>g. PROC TREE<\/h4>\n<p>The PROC TREE <a href=\"https:\/\/en.wikipedia.org\/wiki\/SAS_(software)\">SAS<\/a>\/STAT cluster analysis procedure draws tree diagrams, also called dendrograms or phenograms, using an output from the CLUSTER or VARCLUS procedures. PROC TREE can also create a dataset indicating cluster membership at any specified level of the cluster tree.<br \/>\n<strong>PROC TREE Syntax-<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\">PROC TREE\u00a0 dataset;<\/pre>\n<p>If the input data set has created by CLUSTER or VARCLUS, the only statement required is the PROC TREE statement.<br \/>\n<strong>PROC TREE Example-<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\">title 'proc tree procedure';\r\nods graphics on;\r\nproc cluster data=sashelp.iris method=twostage print=15\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 outtree=tree k=5 ;\r\n\u00a0\u00a0 var SepalLength SepalWidth PetalLength PetalWidth;\r\n\u00a0\u00a0 copy Species;\r\nrun;\r\nproc tree data=tree horizontal lineprinter pages=1 maxh=10;\r\n\u00a0\u00a0 id species;\r\nrun;<\/pre>\n<div id=\"attachment_13639\" style=\"width: 527px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/proc-tree-output-1.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-13639\" class=\"wp-image-13639 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/proc-tree-output-1.png\" alt=\"SAS\/STAT Cluster Analysis - PROC TREE\" width=\"517\" height=\"610\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/proc-tree-output-1.png 517w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/proc-tree-output-1-127x150.png 127w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/proc-tree-output-1-254x300.png 254w\" sizes=\"auto, (max-width: 517px) 100vw, 517px\" \/><\/a><p id=\"caption-attachment-13639\" class=\"wp-caption-text\">SAS\/STAT Cluster Analysis &#8211; PROC TREE<\/p><\/div>\n<p>This was all\u00a0about SAS\/STAT Cluster Analysis Tutorial. Hope you like our explanation of Various Procedures for Cluster Analysis in SAS\/STAT.<br \/>\n<strong><a href=\"https:\/\/data-flair.training\/blogs\/sas-online-quiz\/\">Let&#8217;s explore more with SAS Online Quiz<\/a><\/strong><\/p>\n<h3>Conclusion<\/h3>\n<p>So, this was a complete description and a comprehensive understanding of SAS\/STAT Cluster analysis Procedure. We look at each one of them: PROC ACECLUS, PROC CLUSTER, PROC DISTANCE, PROC VARCLUS, PROC FASTCLUS<br \/>\n, PROC MODECLUS, and PROC TREE with their syntax, and how they can use. Hope you all enjoyed it. Stay tuned for more interesting topics and for any doubts, post it in the comments section below.<\/p>\n<p style=\"font-weight: 400\">Related Topic-\u00a0\u00a0<strong><a href=\"https:\/\/data-flair.training\/blogs\/variables-in-sas\/\">FIRST. and LAST. Variables in SAS<\/a><\/strong><\/p>\n<p><span hidden class=\"__iawmlf-post-loop-links\" data-iawmlf-links=\"[{&quot;id&quot;:1952,&quot;href&quot;:&quot;https:\\\/\\\/en.wikipedia.org\\\/wiki\\\/SAS_(software)&quot;,&quot;archived_href&quot;:&quot;http:\\\/\\\/web-wp.archive.org\\\/web\\\/20251006212914\\\/https:\\\/\\\/en.wikipedia.org\\\/wiki\\\/SAS_(software)&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2025-12-10 13:00:45&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2025-12-15 12:49:28&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2025-12-20 09:32:09&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2025-12-23 17:22:49&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2025-12-30 02:03:38&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-01-05 20:18:15&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-01-09 21:56:50&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-01-12 22:25:10&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-01-16 09:53:16&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-01-20 05:14:31&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-01-27 08:20:47&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-02 05:05:41&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-05 17:02:10&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-13 15:25:01&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-17 13:34:58&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-20 13:51:56&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-24 02:47:03&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-27 04:39:29&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-05 13:34:23&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-16 12:33:12&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-19 20:11:33&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-24 11:59:24&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-27 18:24:40&quot;,&quot;http_code&quot;:429},{&quot;date&quot;:&quot;2026-03-31 15:48:53&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-03 21:34:57&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-07 13:45:06&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-13 08:24:54&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-18 17:14:13&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-24 11:49:04&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-28 03:52:46&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-05-04 10:00:51&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-05-12 20:52:05&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-05-16 12:16:09&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-05-19 15:31:05&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-05-24 17:33:57&quot;,&quot;http_code&quot;:429},{&quot;date&quot;:&quot;2026-05-29 16:03:14&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-06-01 18:43:45&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-06-05 09:43:15&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-06-08 18:48:36&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-06-13 15:49:05&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-06-18 14:07:01&quot;,&quot;http_code&quot;:200}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-06-18 14:07:01&quot;,&quot;http_code&quot;:200},&quot;process&quot;:&quot;done&quot;}]\"><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>We looked at SAS\/ STAT categorical data analysis in the previous tutorial, today we will be looking at SAS\/STAT Cluster analysis and how Cluster Analysis is used in SAS\/STAT for computing clusters between variables&#46;&#46;&#46;<\/p>\n","protected":false},"author":6,"featured_media":13610,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[56],"tags":[2598,12124,12125,12136,12137,12138,12140,12141,12142,12143,12170,12195,12196,12197,12201,12202,12203,15937],"class_list":["post-13586","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-sas-stat","tag-cluster-analysis-in-sasstat","tag-sas-proc-aceclus","tag-sas-proc-aceclus-example","tag-sas-proc-cluster","tag-sas-proc-cluster-example","tag-sas-proc-cluster-syntax","tag-sas-proc-distance","tag-sas-proc-distance-example","tag-sas-proc-distance-syntax","tag-sas-proc-fastclus","tag-sas-proc-modeclus","tag-sas-proc-tree","tag-sas-proc-tree-example","tag-sas-proc-tree-syntax","tag-sas-proc-varclus","tag-sas-proc-varclus-example","tag-sas-proc-varclus-syntax","tag-what-is-sasstat-cluster-analysis"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Learn 7 Simple SAS\/STAT Cluster Analysis Procedures - DataFlair<\/title>\n<meta name=\"description\" content=\"What is SAS\/STAT Cluster Analysis - Procedures for Performing Cluster Analysis in SAS\/STAT, PROC ACECLUS, PROC CLUSTER, PROC VARCLUS with syntax &amp; examples\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/data-flair.training\/blogs\/stat-cluster-analysis\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Learn 7 Simple SAS\/STAT Cluster Analysis Procedures - DataFlair\" \/>\n<meta property=\"og:description\" content=\"What is SAS\/STAT Cluster Analysis - Procedures for Performing Cluster Analysis in SAS\/STAT, PROC ACECLUS, PROC CLUSTER, PROC VARCLUS with syntax &amp; examples\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/stat-cluster-analysis\/\" \/>\n<meta property=\"og:site_name\" content=\"DataFlair\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/DataFlairWS\/\" \/>\n<meta property=\"article:published_time\" content=\"2018-04-17T06:08:17+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-12-03T05:05:32+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/SAS-STAT-CLUSTER-ANALYSIS-01.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"DataFlair Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:site\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"DataFlair Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"12 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Learn 7 Simple SAS\/STAT Cluster Analysis Procedures - DataFlair","description":"What is SAS\/STAT Cluster Analysis - Procedures for Performing Cluster Analysis in SAS\/STAT, PROC ACECLUS, PROC CLUSTER, PROC VARCLUS with syntax & examples","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/data-flair.training\/blogs\/stat-cluster-analysis\/","og_locale":"en_US","og_type":"article","og_title":"Learn 7 Simple SAS\/STAT Cluster Analysis Procedures - DataFlair","og_description":"What is SAS\/STAT Cluster Analysis - Procedures for Performing Cluster Analysis in SAS\/STAT, PROC ACECLUS, PROC CLUSTER, PROC VARCLUS with syntax & examples","og_url":"https:\/\/data-flair.training\/blogs\/stat-cluster-analysis\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2018-04-17T06:08:17+00:00","article_modified_time":"2021-12-03T05:05:32+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/SAS-STAT-CLUSTER-ANALYSIS-01.jpg","type":"image\/jpeg"}],"author":"DataFlair Team","twitter_card":"summary_large_image","twitter_creator":"@DataFlairWS","twitter_site":"@DataFlairWS","twitter_misc":{"Written by":"DataFlair Team","Est. reading time":"12 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/data-flair.training\/blogs\/stat-cluster-analysis\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/stat-cluster-analysis\/"},"author":{"name":"DataFlair Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/2c58ecb4f73a39f0ef993f1ddfcd7b89"},"headline":"Learn 7 Simple SAS\/STAT Cluster Analysis Procedures","datePublished":"2018-04-17T06:08:17+00:00","dateModified":"2021-12-03T05:05:32+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/stat-cluster-analysis\/"},"wordCount":1514,"commentCount":1,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/stat-cluster-analysis\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/SAS-STAT-CLUSTER-ANALYSIS-01.jpg","keywords":["Cluster Analysis in SAS\/STAT","SAS PROC ACECLUS","SAS PROC ACECLUS Example","SAS PROC CLUSTER","SAS PROC CLUSTER Example","SAS PROC CLUSTER Syntax","SAS PROC DISTANCE","SAS PROC DISTANCE Example","SAS PROC DISTANCE Syntax","SAS PROC FASTCLUS","SAS PROC MODECLUS","SAS PROC TREE","SAS PROC TREE EXAMPLE","SAS PROC TREE Syntax","SAS PROC VARCLUS","SAS Proc VARCLUS Example","SAS Proc VARCLUS sYNTAX","What is SAS\/STAT Cluster Analysis"],"articleSection":["SAS - STAT Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/stat-cluster-analysis\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/stat-cluster-analysis\/","url":"https:\/\/data-flair.training\/blogs\/stat-cluster-analysis\/","name":"Learn 7 Simple SAS\/STAT Cluster Analysis Procedures - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/stat-cluster-analysis\/#primaryimage"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/stat-cluster-analysis\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/SAS-STAT-CLUSTER-ANALYSIS-01.jpg","datePublished":"2018-04-17T06:08:17+00:00","dateModified":"2021-12-03T05:05:32+00:00","description":"What is SAS\/STAT Cluster Analysis - Procedures for Performing Cluster Analysis in SAS\/STAT, PROC ACECLUS, PROC CLUSTER, PROC VARCLUS with syntax & examples","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/stat-cluster-analysis\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/stat-cluster-analysis\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/stat-cluster-analysis\/#primaryimage","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/SAS-STAT-CLUSTER-ANALYSIS-01.jpg","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/SAS-STAT-CLUSTER-ANALYSIS-01.jpg","width":1200,"height":628,"caption":"SAS\/STAT Cluster Analysis"},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/stat-cluster-analysis\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog Home","item":"https:\/\/data-flair.training\/blogs\/"},{"@type":"ListItem","position":2,"name":"SAS - STAT Tutorials","item":"https:\/\/data-flair.training\/blogs\/category\/sas-stat\/"},{"@type":"ListItem","position":3,"name":"Learn 7 Simple SAS\/STAT Cluster Analysis Procedures"}]},{"@type":"WebSite","@id":"https:\/\/data-flair.training\/blogs\/#website","url":"https:\/\/data-flair.training\/blogs\/","name":"DataFlair","description":"Learn Today. Lead Tomorrow.","publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/data-flair.training\/blogs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/data-flair.training\/blogs\/#organization","name":"DataFlair","url":"https:\/\/data-flair.training\/blogs\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","width":106,"height":48,"caption":"DataFlair"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/DataFlairWS\/","https:\/\/x.com\/DataFlairWS","https:\/\/www.linkedin.com\/company\/dataflair-web-services-pvt-ltd\/","https:\/\/www.youtube.com\/user\/DataFlairWS"]},{"@type":"Person","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/2c58ecb4f73a39f0ef993f1ddfcd7b89","name":"DataFlair Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/1ce4a0e3e542444fc73bbebf83e89e8b73e2d95ccb1fcee64da9945f078b97c5?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/1ce4a0e3e542444fc73bbebf83e89e8b73e2d95ccb1fcee64da9945f078b97c5?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/1ce4a0e3e542444fc73bbebf83e89e8b73e2d95ccb1fcee64da9945f078b97c5?s=96&d=mm&r=g","caption":"DataFlair Team"},"description":"The DataFlair Team provides industry-driven content on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. Our expert educators focus on delivering value-packed, easy-to-follow resources for tech enthusiasts and professionals.","url":"https:\/\/data-flair.training\/blogs\/author\/dfteam2\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/13586","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/comments?post=13586"}],"version-history":[{"count":7,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/13586\/revisions"}],"predecessor-version":[{"id":104685,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/13586\/revisions\/104685"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media\/13610"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=13586"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=13586"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=13586"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}