If I'm mot mistake, merge will, by default, make the total number of observations in the final data set set as the sum of the maximum number of observations in a BY-group from either data set.
How do I make the total number of observations in the final data set as the sum of the MINIMUM number of observations in the BY group from either data set?
I have this:
& I'd like:
ID region size
1 A 5
1 A 6
2 A 3
2 A 4
3 B 4
3 B 5
4 C 5
Thank you in advance.
Thank you. I should elaborate. My first data set is actually similar to this:
And I'd like to match by the number of observations in this dataset. However, if I use first.id, then it only matches by the very first observation.
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.