Hello,
I have to run regression in a loop on a panel data set. My data is of the following format:
I have to regress cash_flow over time, where (1994=1, 1995=2, 1996=3). For each observation I have to calculate regression coefficient for past 3 years. Overall, my data spans over 20 years and have over 100 panels. Is there a way to run the above regression in a loop and save the coefficient of regression(slope) into my data.
Thanks,
Shekhar
I have to run regression in a loop on a panel data set. My data is of the following format:
panel_id | year | cash_flow |
1 | 1994 | 35 |
1 | 1995 | 39 |
1 | 1996 | 24 |
Thanks,
Shekhar