Hope that you can help me.
I have to run a regression only when I have at least 15 observations per year and industry.
So I was thinking to, firstly, generate variable that counts how many observation per industry and year I have. After I run regression like this:
Code:
reg y x1 x2 x3 x4 x5 if numb_obs>=15
How can I create this variable "numb_obs"?
Thank you in advance for your help
0 Response to How to generate a variable that count how many observation I have per group
Post a Comment