Hi guys, I'm new to SAS and is doing a research on cross ownership. A short version of my data looks like follows: Firm Year_Quarter Industry Manager 00282410 1980Q1 116 001 00282410 1980Q2 116 002 00807310 1980Q1 120 001 00807310 1980Q3 120 003 41321630 1981Q2 116 002 41321630 1981Q3 116 002 What I want to do is to create a new variable called NumConnected , which is, for each firm in each Year_Quarter, the number of same-industry firms that also have same manager id. My ideal result table would look like follows: Firm Year_Quarter Industry Manager NumConnected 00282410 1980Q1 116 001 0 00282410 1980Q2 116 002 1 00807310 1980Q1 120 001 0 00807310 1980Q3 120 003 0 41321630 1980Q2 116 002 0 41321630 1980Q3 116 002 1 How should I do this in SAS? Thanks very much!
... View more