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