we have 2 datasets: dataset 1: for each id1-id2 pair, inter_id have so many values dataset 2: for each id2-inter_id pair, y and x can have so many values final we want b for each id1-id2 pair: e.g. b_AM is calculated by regressing y on x using (K1+K2+K3) observations
So what does b_AM equal in the first obs?
I'm not following the need for a macro. If you do the merge, then you can do all the regressions with a BY statement.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.