Announcement

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

  • Moderating Variable - Panel Data

    Hello friends and STATA experts,

    after quick and great help with my last problem I've come to seek your wisdom again, hopefully.

    I'm running a simple random effects regression: DV (ESG) and IV (Sh and Pa). So far, so good:


    . xtreg $ylist $xlist, re

    Random-effects GLS regression Number of obs = 4,801
    Group variable: comp Number of groups = 683

    R-sq: Obs per group:
    within = 0.0312 min = 1
    between = 0.0936 avg = 7.0
    overall = 0.0531 max = 8

    Wald chi2(2) = 204.63
    corr(u_i, X) = 0 (assumed) Prob > chi2 = 0.0000

    ------------------------------------------------------------------------------
    ESG | Coef. Std. Err. z P>|z| [95% Conf. Interval]
    -------------+----------------------------------------------------------------
    Sh | -.0717968 .0105774 -6.79 0.000 -.092528 -.0510655
    Pa | -7.636461 .663959 -11.50 0.000 -8.937797 -6.335126
    _cons | 56.73223 .7828353 72.47 0.000 55.1979 58.26656
    -------------+----------------------------------------------------------------
    sigma_u | 9.1761324
    sigma_e | 19.153479
    rho | .18667569 (fraction of variance due to u_i)
    ------------------------------------------------------------------------------

    Now, I'm trying to include a moderating (dummy) variable to see if Industry effects affect the relationship of the DV and IV.
    My moderaing variable is 1 for controversial industries and 0 for uncontroversial industries. I want to show that this variable moderates the realtionship between my DV(ESG) and one of my IV(Sh).
    And at this point I'm not sure how to show that. I tried it this way:


    . xtreg $ylist Sh Industry, re

    Random-effects GLS regression Number of obs = 4,801
    Group variable: comp Number of groups = 683

    R-sq: Obs per group:
    within = 0.0117 min = 1
    between = 0.0283 avg = 7.0
    overall = 0.0185 max = 8

    Wald chi2(2) = 69.94
    corr(u_i, X) = 0 (assumed) Prob > chi2 = 0.0000

    ------------------------------------------------------------------------------
    ESG | Coef. Std. Err. z P>|z| [95% Conf. Interval]
    -------------+----------------------------------------------------------------
    Sh | -.0885863 .0106335 -8.33 0.000 -.1094275 -.0677451
    Industry | -.692654 1.611324 -0.43 0.667 -3.85079 2.465483
    _cons | 53.18053 .7455474 71.33 0.000 51.71928 54.64178
    -------------+----------------------------------------------------------------
    sigma_u | 9.6593325
    sigma_e | 19.34267
    rho | .19960292 (fraction of variance due to u_i)
    ------------------------------------------------------------------------------


    Does this come close?
    Can I forget all about the effect anyway because the p-value is lightyears from significance?

    Thank you kindly for all help and comments in advance,
    Konstantin



  • #2
    Konstantin:
    why not interacting the two predictors:
    Code:
    xtreg ESG i.industry##c.Sh, re///I assume that -Sh- is continuous
    Kind regards,
    Carlo
    (StataNow 18.5)

    Comment


    • #3
      Oh yes, Carlo Lazzaro once again saving the day! I think this is exactly what I needed :D
      You assumed right, Sh is continuous. So I assume what I coloured red is the reg result in absence of the second predictor and blue the reg result if Industry takes the value of 1 (uncontroversial industry). Can I see the result if it takes the value of 0 (controversial industry)?




      . xtreg ESG i.Industry##c.Sh, re

      Random-effects GLS regression Number of obs = 4,801
      Group variable: comp Number of groups = 683

      R-sq: Obs per group:
      within = 0.0153 min = 1
      between = 0.0268 avg = 7.0
      overall = 0.0205 max = 8

      Wald chi2(3) = 84.32
      corr(u_i, X) = 0 (assumed) Prob > chi2 = 0.0000

      -------------------------------------------------------------------------------
      ESG | Coef. Std. Err. z P>|z| [95% Conf. Interval]
      --------------+----------------------------------------------------------------
      1.Industry | 7.248824 2.650763 2.73 0.006 2.053425 12.44422
      Sh | -.0756342 .0111586 -6.78 0.000 -.0975047 -.0537637
      |
      Industry#c.Sh |
      1 | -.1371937
      .0363524 -3.77 0.000 -.2084432 -.0659443
      |
      _cons | 52.49561 .7668998 68.45 0.000 50.99252 53.99871
      --------------+----------------------------------------------------------------
      sigma_u | 9.6771477
      sigma_e | 19.309291
      rho | .200746 (fraction of variance due to u_i)
      -------------------------------------------------------------------------------

      EDIT: I think I got it on my own:

      . xtreg ESG i.Industry#c.Sh, re

      Random-effects GLS regression Number of obs = 4,801
      Group variable: comp Number of groups = 683

      R-sq: Obs per group:
      within = 0.0139 min = 1
      between = 0.0234 avg = 7.0
      overall = 0.0189 max = 8

      Wald chi2(2) = 76.75
      corr(u_i, X) = 0 (assumed) Prob > chi2 = 0.0000

      -------------------------------------------------------------------------------
      ESG | Coef. Std. Err. z P>|z| [95% Conf. Interval]
      --------------+----------------------------------------------------------------
      Industry#c.Sh |
      0 | -.0824393 .0108853 -7.57 0.000 -.1037742 -.0611044
      1 | -.140694 .0224061 -6.28 0.000 -.1846091 -.0967788
      |
      _cons | 53.10258 .7344456 72.30 0.000 51.66309 54.54207
      --------------+----------------------------------------------------------------
      sigma_u | 9.6685904
      sigma_e | 19.309291
      rho | .20046227 (fraction of variance due to u_i)
      -------------------------------------------------------------------------------



      Last edited by Konstantin Wiesemann; 13 Jun 2018, 03:24.

      Comment


      • #4
        Konstantin:
        - the main issue with your model is that you have a very limited number of predictors (between = 0.0268 is pretty low); hence, your model may suffe from omitted variable bias. I would skim the literature in your research field and see what others did in the past when compared with the same research goal;
        - for the future, please use CODE delimiters to share what you typed and what Stata gave you back. Thanks.
        Kind regards,
        Carlo
        (StataNow 18.5)

        Comment

        Working...
        X