Hello,
I need to run cross-sectional regression for each industry and year in order to calculate proxy for real earnings management. I have tried many different commands without success. My sample consist of 209 companies, 5 years and 15 industries. There are two industries that only have 5 observations (because there is only one company within that industry) and three industries that only have 10 observations (two companies within that industry). The problem is that none of the commands I have tried, calculate residuals for every company for every year. There is always missing values with companies that belong those industries that does not have many observations.
I have one dependent variable, three independent variables and constant in that regression.
Is there any command that I can use in order not to drop any industries from my sample?
I need to run cross-sectional regression for each industry and year in order to calculate proxy for real earnings management. I have tried many different commands without success. My sample consist of 209 companies, 5 years and 15 industries. There are two industries that only have 5 observations (because there is only one company within that industry) and three industries that only have 10 observations (two companies within that industry). The problem is that none of the commands I have tried, calculate residuals for every company for every year. There is always missing values with companies that belong those industries that does not have many observations.
I have one dependent variable, three independent variables and constant in that regression.
Is there any command that I can use in order not to drop any industries from my sample?

Comment