BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
MR_E
Obsidian | Level 7

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;

 

1 ACCEPTED SOLUTION

Accepted Solutions
sbxkoenk
SAS Super FREQ
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

2 REPLIES 2
Ksharp
Super User
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;


sbxkoenk
SAS Super FREQ
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

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

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