I am a freshman in doing regerssion and also in using python / r I am now studying the non-linear relationship between ESG performance and Financial Performance of companies, with a set of panel data and the following equation:
ROA = C(1) + C(2)*ENV + C(3)*ENV2 + C(4)*SOC + C(5)*SOC2 + C(6)*GOV +
C(7)*GOV2 + C(8)*LNA + C(9)*LEV + C(10)*PB + C(11)*LNOE
ENV2, SOC2 & GOV2 are the quadratic terms for ENV, SOC & GOV respectively, and C(8)-C(11) are control variables.
I would like to plot a graph to show the marginal effect of ENV/SOC/GOV on ROA, so my question is how can I do that the plot the u-shaped or inverse u-shaped fitting curve via python or r?
Many thanks!