Loop regressions

I'd like to do loop regressions. My data is panel data, for each month, I have several firms and several variables(X1:X3). For each month, I want to do simple cross sectional regression for each variables. In this case, I have 3 cross sectional regressions for each month.

Once I get the coefficients C1:C3 for each months, I want to add it back to my original dataset, and firms A, B, C for each month share the C1:C3.


Welcome to the forum. It will be a lot easier if you can provide some code/reprex and we can then take it from there :slight_smile: . See here: FAQ: How to do a minimal reproducible example ( reprex ) for beginners

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.