Programming the statistical procedures from SAS

How can i use Proc FASTCLUS to copy my predefined cluster numbers?

Accepted Solution Solved
Reply
Contributor
Posts: 26
Accepted Solution

How can i use Proc FASTCLUS to copy my predefined cluster numbers?

Morning,

 

As per the attached Document illustrates, i have a Final Dataset of identified clusters from a number of PROC Fastclus statements on broken down data prior to this - essentially this FINAL_CLUSters is my dataset with the required NEWCLUSTERS variable indicating the wanted Cluster.

 

Now i need to get the SEED stats using OUTSTAT= , for application of these clusters to future monthly observations,  i need the centre points of my Clusters.

 

However, when i use the PROC FASTCLUS on this final_clusters dataset , my cluster numbers change (as per the diagram on the attached file), they are no longer 1,2,3,4,5,6 but rather NEWCLUSTER 1 is now split into CLUSTERS 6 &1 - how can i keep my same clusters from my chosen NEWCLUSTERS and identify the seeds this way:

 

proc fastclus data=FINAL_CLUSters maxclusters=6 maxiter=100 converge=0

out=prelimvol;

var VOLUME: LOGVAL_MEAN: LOGVAL_Sum:;

run;

 


Accepted Solutions
Solution
‎04-24-2017 09:00 AM
SAS Employee
Posts: 51

Re: How can i use Proc FASTCLUS to copy my predefined cluster numbers?

proc sort data=mylib.myCLUSds; by NEWCLUSTER; run;
proc fastclus data=mylib.myCLUSds 
              maxclusters=1 maxiter=0 
              outstat=work.abc outseed=work.def out=work.xyz;
			  /* OUTSEED= or MEAN= */
 id name;
 by NEWCLUSTER;
 var _NUMERIC_;
 *var VOLUME: LOGVAL_Mean: LOGVAL_Sum: ;
run;

 

Cheers,

Koen

View solution in original post


All Replies
Super User
Posts: 9,758

Re: How can i use Proc FASTCLUS to copy my predefined cluster numbers?

Post some sample data, so we can test it.
and don't forget post output either.

data prelimvol;
 set prelimvol;
 if col1 not =: 'cluster' then group+1;
run;


Solution
‎04-24-2017 09:00 AM
SAS Employee
Posts: 51

Re: How can i use Proc FASTCLUS to copy my predefined cluster numbers?

proc sort data=mylib.myCLUSds; by NEWCLUSTER; run;
proc fastclus data=mylib.myCLUSds 
              maxclusters=1 maxiter=0 
              outstat=work.abc outseed=work.def out=work.xyz;
			  /* OUTSEED= or MEAN= */
 id name;
 by NEWCLUSTER;
 var _NUMERIC_;
 *var VOLUME: LOGVAL_Mean: LOGVAL_Sum: ;
run;

 

Cheers,

Koen

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 3893 views
  • 1 like
  • 3 in conversation