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
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

Comment