Hi all! I am trying to do a rolling OLS regression with a data that has variables YEAR, COMPANY_ID, Y, X1, X2 and X3. The data includes multiple companies (COMPANY_ID) for years 1995-2020 and different companies appear in the sample for different time periods. The end result I am looking for is to have a table with regression coeficcient values for each regression time window. The simple OLS regression code for the first time window would be the following: PROC REG DATA=MY_DATA; MODEL Y=X1 X2 X3; where 1995 <= YEAR <= 2000; QUIT; Do you know how I could include for example a loop into my code that would move the time period with one year after every run and save the coefficcient values to a table? I have found a lot of different macros for rolling regression but I have been unable to use them due to extremely limited knowledge on SAS. Thank you in advance for the help!
... View more