Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Cross-sectional regression for every industry and year

    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?

  • #2
    Maria:
    welcome to this forum.
    As per FAQ:
    1) please share what you typed and what Stata gave you back;
    2) please share and example/excerpt of your dataset via -dataex-.
    Thanks,
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      I have one dependent variable, three independent variables and constant in that regression.
      So each regression is estimating 4 parameters. Most advice runs that you need many more data points than the number of parameters to do a good job.

      Comment

      Working...
      X