BookmarkSubscribeRSS Feed
SWEETSAS
Obsidian | Level 7
Data have1;
Input Sampleid reps id $ a  b;
Datalines ;
1 1 00-01 5 3
1 1 00-02 4 6
1 1 00-03 6 4
1 1 00-06 4 6
1 2 00-02 4 6 
1 2 00-03 6 4
1 2 00-04 7 5
1 2 00-05 9 2
1 3 00-01 5 3
1 3 00-02 4 6
1 3 00-05 9 2
1 3 00-10 7 4
1 4 00-03 6 4
1 4 00-05 9 2
1 4 00-09 7 3
1 4 00-10 7 4
1 5 00-03 6 4
1 5 00-04 7 5
1 5 00-07 5 8
1 5 00-09 7 3
1 6 00-02 4 6
1 6 00-03 6 4
1 6 00-05 9 2
1 6 00-10 7 4
Data have2;
Input Sampleid reps id $ a  b;
Datalines ;
1 1 00-01 5 3
1 1 00-02 4 6
1 1 00-03 6 4
1 1 00-06 4 6
;run;


 

Given two data sets HAVE1 and HAVE2 above, is it possible to compute distance between each of the REPS  in HAVE1 with HAVE2 using FASTCLAUST--or any other SAS procedure? The distance is to formed  using variables A and B. The number of distance so derived will be equal to number of REPS in HAVE1. Since, the are 6 REPS, there should be six values of distances, signfigying distance from each of REPS in HAVE1 to the data set HAVE2.  

 

Thanks,

 

Jack

1 REPLY 1
Ksharp
Super User

PROC FASTCLAUST should perform K-means algorithm , therefore you can't guarantee it will split the data into two groups as your data showed, so you can't  get the distance by FASTCLAUST ,unless these two group data are apparetly different to each other.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 1 reply
  • 1435 views
  • 0 likes
  • 2 in conversation