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

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 1342 views
  • 0 likes
  • 2 in conversation