You need to develop test cases.
Then check that each case is returning the correct number
of records. Make sure to test edge cases - ones with no
matches either by ID or by time, missing data, and/or a large number of matches.
Also, test each case individually
and then as a set.
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.