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
微信截图_20220329154031.jpg
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.
It's your turn to help shape SAS Innovate 2027. Share your expertise and inspire the SAS community.
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.
Ready to level-up your skills? Choose your own adventure.