a) putting DATA1 into a hash with TIME as key
b) iterate over DATA2 using both time values to find the relevant hash elements and doing the mean calculation
Others having SAS at their hands might chime in with some ready-to-use code.
(Note that this solution largely depends on the size of DATA1. If it is a very big dataset consider defining/using DATA1 as a dataset indexed on TIME).
SAS Innovate 2025: Register Now
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9. Sign up by Dec. 31 to get the 2024 rate of just $495. 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.