<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Clustering Glitch (Gower's Distance) in SAS Data Science</title>
    <link>https://communities.sas.com/t5/SAS-Data-Science/Clustering-Glitch-Gower-s-Distance/m-p/440320#M6753</link>
    <description>&lt;P&gt;You are creating a TYPE=SIMILAR data set with PROC DISTANCE.&amp;nbsp; I am far from an expert on PROC CLUSTER, but I don't think it expects that type of data set.&amp;nbsp; I see no mention of that type in the documentation. So it appears to be treating it as a raw data set.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 26 Feb 2018 19:52:21 GMT</pubDate>
    <dc:creator>WarrenKuhfeld</dc:creator>
    <dc:date>2018-02-26T19:52:21Z</dc:date>
    <item>
      <title>Clustering Glitch (Gower's Distance)</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Clustering-Glitch-Gower-s-Distance/m-p/440311#M6752</link>
      <description>&lt;P&gt;Good afternoon!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am having a glitch on a procedure that I have used before, and I have been unsuccessfully troubleshooting for the past couple of days. I am using SAS EG 7.1. I have provided part of the data set and my code. I am trying to cluster using the Gower distance because I have mixed data (This particular example contains 3 continuous variables). Can anybody help? I only get an error when I use Gower's distance. Using something else (eg euclid) resolves the issue. What am I missing? I am getting the following error message:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;NOTE: 20 observation(s) omitted due to missing values.&lt;BR /&gt;ERROR: All variables are constant.&lt;BR /&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;WARNING: The data set WORK.TREE may be incomplete. When this step was stopped &lt;BR /&gt; there were 0 observations and 37 variables.&lt;BR /&gt;WARNING: Data set WORK.TREE was not replaced because this step was stopped.&lt;BR /&gt;NOTE: PROCEDURE CLUSTER used (Total process time):&lt;BR /&gt; real time 0.01 seconds&lt;BR /&gt; cpu time 0.00 seconds&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
data sample_data_set;
input ln_Reviewed_Total_count TMC_change cust_age_num @@;
datalines;
44 0 0.955151741
29 1.386294361 0.973456357
36 1.609437912 0.811390135
21 0.693147181 0.18526393
30 0 1
36 1.098612289 0.403113033
52 0 1
62 1.098612289 0.402174032
61 1.609437912 0.249291364
31 1.386294361 0.475851967
26 0 0.5
30 2.079441542 1
27 2.48490665 0.89780873
25 2.197224577 0.962191474
21 1.386294361 0.394982113
26 0 0.913725826
37 0 0.676080022
50 0 0.34542518
35 0 0.295087229
59 0 0.927908197
48 0 0.667473752
run;


%let inputs=ln_Reviewed_Total_count TMC_change cust_age_num;



PROC DISTANCE Data=sample_data_set METHOD=gower out=distances;
VAR interval(&amp;amp;inputs/std=range);
RUN;



PROC CLUSTER Data=distances METHOD=average OUTTREE=tree PSEUDO print=15; 
VAR dist:;
RUN;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Feb 2018 19:27:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Clustering-Glitch-Gower-s-Distance/m-p/440311#M6752</guid>
      <dc:creator>Greek</dc:creator>
      <dc:date>2018-02-26T19:27:26Z</dc:date>
    </item>
    <item>
      <title>Re: Clustering Glitch (Gower's Distance)</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Clustering-Glitch-Gower-s-Distance/m-p/440320#M6753</link>
      <description>&lt;P&gt;You are creating a TYPE=SIMILAR data set with PROC DISTANCE.&amp;nbsp; I am far from an expert on PROC CLUSTER, but I don't think it expects that type of data set.&amp;nbsp; I see no mention of that type in the documentation. So it appears to be treating it as a raw data set.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Feb 2018 19:52:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Clustering-Glitch-Gower-s-Distance/m-p/440320#M6753</guid>
      <dc:creator>WarrenKuhfeld</dc:creator>
      <dc:date>2018-02-26T19:52:21Z</dc:date>
    </item>
    <item>
      <title>Re: Clustering Glitch (Gower's Distance)</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Clustering-Glitch-Gower-s-Distance/m-p/440324#M6754</link>
      <description>&lt;P&gt;As &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/16777"&gt;@WarrenKuhfeld&lt;/a&gt;&amp;nbsp;mentioned, you are creating a TYPE=SIMILAR matrix when you request GOWER.&amp;nbsp; &amp;nbsp;If you specify DGOWER, it produces a TYPE=DISTANCE matrix.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV class="xis-refProc"&gt;
&lt;DIV id="statug.distance.distanceproc" class="AAsection"&gt;
&lt;DIV class="AAoptions"&gt;
&lt;DL class="AAoptions"&gt;
&lt;DD&gt;
&lt;DIV id="statug.distance.rioan"&gt;
&lt;P class="AAoutputtitle"&gt;Table 36.2: Methods That Accept All Measurement Levels&lt;/P&gt;
&lt;DIV class="-contents"&gt;
&lt;TABLE class="AAtabular"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TH&gt;
&lt;P&gt;Method&lt;/P&gt;
&lt;/TH&gt;
&lt;TH&gt;
&lt;P&gt;Description&lt;/P&gt;
&lt;/TH&gt;
&lt;TH&gt;
&lt;P&gt;Range&lt;/P&gt;
&lt;/TH&gt;
&lt;TH&gt;
&lt;P&gt;TYPE=&lt;/P&gt;
&lt;/TH&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;P&gt;&lt;SPAN class=" AAkeyword"&gt;GOWER&lt;/SPAN&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;Gower and Legendre (&lt;A href="http://127.0.0.1:56153/help/statug.hlp/statug_distance_references.htm#statug_distancegowe_j86" target="_blank"&gt;1986&lt;/A&gt;) similarity&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;0 to 1&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;&lt;SPAN class=" AAkeyword"&gt;SIMILAR&lt;/SPAN&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;P&gt;&lt;SPAN class=" AAkeyword"&gt;DGOWER&lt;/SPAN&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;1 minus GOWER&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;0 to 1&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;&lt;SPAN class=" AAkeyword"&gt;DISTANCE&lt;/SPAN&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DD&gt;
&lt;/DL&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;/*** TRY THIS CODE ***/&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;data sample_data_set;&lt;BR /&gt;input ln_Reviewed_Total_count TMC_change cust_age_num @@;&lt;BR /&gt;datalines;&lt;BR /&gt;44 0 0.955151741&lt;BR /&gt;29 1.386294361 0.973456357&lt;BR /&gt;36 1.609437912 0.811390135&lt;BR /&gt;21 0.693147181 0.18526393&lt;BR /&gt;30 0 1&lt;BR /&gt;36 1.098612289 0.403113033&lt;BR /&gt;52 0 1&lt;BR /&gt;62 1.098612289 0.402174032&lt;BR /&gt;61 1.609437912 0.249291364&lt;BR /&gt;31 1.386294361 0.475851967&lt;BR /&gt;26 0 0.5&lt;BR /&gt;30 2.079441542 1&lt;BR /&gt;27 2.48490665 0.89780873&lt;BR /&gt;25 2.197224577 0.962191474&lt;BR /&gt;21 1.386294361 0.394982113&lt;BR /&gt;26 0 0.913725826&lt;BR /&gt;37 0 0.676080022&lt;BR /&gt;50 0 0.34542518&lt;BR /&gt;35 0 0.295087229&lt;BR /&gt;59 0 0.927908197&lt;BR /&gt;48 0 0.667473752&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;%let inputs=ln_Reviewed_Total_count TMC_change cust_age_num;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PROC DISTANCE Data=sample_data_set METHOD=dgower out=distances;&lt;BR /&gt;VAR interval(&amp;amp;inputs/std=range);&lt;BR /&gt;RUN;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PROC CLUSTER Data=distances METHOD=average OUTTREE=tree PSEUDO print=15; &lt;BR /&gt;VAR dist:;&lt;BR /&gt;RUN;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Feb 2018 20:31:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Clustering-Glitch-Gower-s-Distance/m-p/440324#M6754</guid>
      <dc:creator>DougWielenga</dc:creator>
      <dc:date>2018-02-26T20:31:21Z</dc:date>
    </item>
  </channel>
</rss>

