Announcement

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

  • Identify/test differences across groups

    Dear Statalist,

    I have an unbalanced panel with ca. 200 firms, and between 3-8 years of data for each firm. In total, there are around 1100 observations (see data example below)

    I want to test if the effect of firm size (SIZE) on return on equity (ROE) is different across industries. For this purpose, I have come across different methods that could help me:

    (1) Estimate a separate regression for each industry and then compare the coefficients associated with SIZE:
    e.g.: xtreg ROE SIZE if industry8==1, fe robust

    (2) Estimate one regression and let industry dummies interact with SIZE:
    e.g: xtreg ROE SIZE industry8*SIZE industry9*SIZE ... industryX*SIZE, fe robust

    (3) Estimate industry fixed effects: I am not sure how to perform this and interpret the results. I tried the following:
    xtset industry year
    xtreg ROE SIZE, fe vce(cluster industry)
    But this gives me the following error: repeated time values within panel


    So, my question is:
    (i) Which of these methods (if any) should I use to test whether the effect of SIZE on ROE is different for firms across industries
    (ii) How do I implement it correctly in STATA? (Depends on the answer of the first question)
    (iii) How would you solve the problem if SIZE^2 is included as an additional explanatory variable?

    I would appreciate any help.


    Code:
    * Example generated by -dataex-. To install: ssc install dataex
    clear
    input int Company_num float(ROE SIZE industry)
    
    10    .2027649 16.423996  8
    10  -.06490728 16.777615  8
    10    .1564562 16.957634  8
    10  -1.3700558 16.587175  8
    11    .2409944 14.614808 10
    11 -.019694684 14.764834 10
    11     .340615 15.061542 10
    11    .4010344 15.282972 10
    11    .4155528  15.50252 10
    11    .3101843 15.766982 10
    11   .20718624 16.028524 10
    11    .1902793 16.139278 10
    12  -.11885364  13.42089  5
    12   .05883176 13.731207  5
    12  -.05271904 13.727402  5
    12  -.22898807  13.66704  5
    end


  • #2
    Method 1 is good in theory, but you can't really implement it because there is no procedure to directly compare coefficients from different regressions with -xtreg-. (You can do this with -regress- and many other estimators, but not with -xtreg-)

    Method 2 is your best bet. It's simpler than what you wrote:
    Code:
    xtreg ROE i.industry##c.SIZE, fe vce(cluster Company_num)
    There is no need to create separate industry dummy variables. Just work with the categorical industry variable directly, and use the factor-variable notation as I show it.

    Note that unless there are firms that change industries over time, industry itself will be colinear with the company fixed effects so the industry indicators will be omitted from the model. This is perfectly expected and is nothing to worry about. The interaction terms, which are what matter here, will not be colinear and will remain in the model (except 1 for the base industry).

    Method 3. I could show you how to fix it so you don't get the error message, but this approach won't even do what you're looking for anyway, so let's just forget about it.

    If you want to add a quadratic term in size, the code becomes:

    Code:
    xtreg ROE i.industry##c.SIZE##c.SIZE, fe vce(cluster Company_num)
    Do read -help fvvarlist- and become familiar with factor-variable notation. It's one of Stata's best features.

    Comment


    • #3
      Thank you for the answer. It helped me a lot.
      However, is it possible to joint test whether the interaction variables are significantly different from zero?
      Or do you believe it is sufficient to just look at their p-values in the regression output?

      Comment

      Working...
      X