Announcement

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

  • Plotting FE Panel Regression Results

    Dear Statalist Community,

    I am using Stata for academic projects and have encountered an issue in my recent one when trying to visualize regression outputs.

    I have performed a panel regression, which included tobins_q as the dependent variable, ESGScore as the independent one, two moderators (see interaction terms with ##) and several controls. You can see the regression command below:

    xtreg log_tobins_q c.lag1_ESGScore /// DV, IV
    c.lag1_ESGScore##c.lag1_log_xrdi c.lag1_ESGScore##i.lag1_committee_dummy /// Moderating Variables
    c.lag1_numberdirectors c.lag1_genderratio i.lag1_CEOpresence_dummy /// Control Variables
    c.lag1_log_total_debt c.lag1_log_at c.lag1_log_slack c.lag1_log_revt /// Control Variables
    i.fyear, fe vce(cluster gvkey)

    Now I would like to plot the results for each Hypotheses with a line graphic.
    The coeffient for the H1 (ESGScore is positively associated with tobins_q) is β = 0.002, implying a positive degradient.
    However, when trying with margins plot or twoscatter, I always get a graphic with a negativ degradient. This was my command:

    twoway (lfit pred_val lag1_ESGScore, lcolor(red) lwidth(medium)), ///
    title("Impact of ESG Score on Firm Performance") ///
    xtitle("ESG Score") ytitle("Firm Performance (log Tobin's Q)") ///
    legend(off)

    My assumption is, that my stata command only refers to a regression inlcuding ESGScore and tobins_q (ignoring the further controls and moderations), in which case the negative degradient would make sense.
    Still, what I need to plot is their association as is in the full model including all variables.

    Can someone assist on how to do this?
    And also how to implement this for a moderating variable as log_xrdi?

    Thanks in advance!
    Lea





  • #2
    Short addition:
    Also tried margins plot - not succesfull.... Command for that was :
    margins, at(lag1_ESGScore=(0(0.01)1))
    marginsplot, recast(line) ///
    title("Impact of ESG Score on Firm Performance") ///
    xtitle("ESG Score") ytitle("Firm Performance (log Tobin's Q)") ///
    xlabel(0(0.1)1) ylabel(, angle(0))

    Comment


    • #3
      You don't explain what you mean by H1 in "The coeffient for the H1 (ESGScore is positively associated with tobins_q) is β = 0.002." But given that you have an interaction model, you have to bear in mind thatthere is no single coefficient that expresses the slope of the tobins_q:ESGScore relationship. For example, if you think that the coefficient of lag1_ESGScore itself tells you the slope of that relationship only when all of the variables that interact with lag1_ESGScore are zero. For other values of those variables, the relationship of tobins_q:ESGScore will be different. So you cannot get the whole picture of the tobins_q:ESGScore relationship with any single coefficient.

      To fully grasp the relationship, you should use -margins- and -marginsplot-. The code you show for that looks appropriate. But as you don't explain what you mean when you say it was "not successful." So I can't offer you any concrete advice. If what you mean is that the graph didn't look like a line with slope 0.002, that isn't because it was "not successful." That would just be another indication of your not correctly interpreting your results.

      Interaction models can be complicated to interpret. The simplest ones, with only an interaction between two dichotomous variables, are fairly easy, as are those with a single interaction between a continuous variable and a dichotomy. But you have two interactions, one of which is continuous with continuous. So that's going to be pretty difficult: I suspect that even experienced statisticians looking at the -xtreg- output would find it difficult or impossible to describe what the relationship looks like. You really need the marginsplot for that.

      Finally, plotting with -lfit- will not give you a correct graph of an -xtreg, fe- model. The regression fit by -lfit- is a simple bivariate regression that ignores all of your moderators and covariates and doesn't even account for the fixed effects. It really has no useful relationship at all with your actual analysis.

      Added: If you want additional, more specific help with this, you should post back showing the complete output from -xtreg-, from -margins- and show the graph that -marginsplot- gave you.
      Last edited by Clyde Schechter; 27 Jan 2025, 12:22.

      Comment

      Working...
      X