<?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: How to provide stopping criteria for clustering in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-provide-stopping-criteria-for-clustering/m-p/546857#M151486</link>
    <description>&lt;P&gt;Make a macro for it .&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
%MACRO ABC(Data);
     %let dsid=%sysfunc(open( &amp;amp;data ));
     %let nobs=%sysfunc(attrn(&amp;amp;dsid, nlobs ));
     %let dsid=%sysfunc(close(&amp;amp;dsid));

    %if &amp;amp;nobs &amp;gt; 2 %then %do;
     proc fastclus data=&amp;amp;Data maxc=2 out=corrCluster noprint;
     run;
    %end;
%MEND ABC;




   	%ABC(abc1)&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 28 Mar 2019 11:56:28 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2019-03-28T11:56:28Z</dc:date>
    <item>
      <title>How to provide stopping criteria for clustering</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-provide-stopping-criteria-for-clustering/m-p/546850#M151483</link>
      <description>&lt;P&gt;I am trying to provide stopping criteria for clustering if K(no of cluster) is less than number of rows.&lt;/P&gt;&lt;P&gt;I have tried using PROC IML, but not getting proper output.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data abc1;
input A;
datalines;
20
;

%MACRO ABC(Data);
     proc fastclus data=&amp;amp;Data maxc=2 out=corrCluster noprint;
     run;
%MEND ABC;

proc iml;     
     use abc1;
     read all into X1;
			
     if(nrow(X1)&amp;gt;=2) then
     do;
   	%ABC(abc1);
     end;
quit;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Can you plz tell how to fix above...&lt;/P&gt;&lt;P&gt;Or is there another way to do this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Mar 2019 11:36:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-provide-stopping-criteria-for-clustering/m-p/546850#M151483</guid>
      <dc:creator>K_coder</dc:creator>
      <dc:date>2019-03-28T11:36:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to provide stopping criteria for clustering</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-provide-stopping-criteria-for-clustering/m-p/546857#M151486</link>
      <description>&lt;P&gt;Make a macro for it .&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
%MACRO ABC(Data);
     %let dsid=%sysfunc(open( &amp;amp;data ));
     %let nobs=%sysfunc(attrn(&amp;amp;dsid, nlobs ));
     %let dsid=%sysfunc(close(&amp;amp;dsid));

    %if &amp;amp;nobs &amp;gt; 2 %then %do;
     proc fastclus data=&amp;amp;Data maxc=2 out=corrCluster noprint;
     run;
    %end;
%MEND ABC;




   	%ABC(abc1)&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 28 Mar 2019 11:56:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-provide-stopping-criteria-for-clustering/m-p/546857#M151486</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2019-03-28T11:56:28Z</dc:date>
    </item>
  </channel>
</rss>

