How Create size-based portfolios and estimate cross-sectional regressions
I want to two groups based on size of the firm. The groups should be based on median size of firms in each year. Then I want estimate a cross-sectional regression by year and the size-based groups. I wonder how the setup would look like and would be thankful if someone can share the Stata code
Thank you.