I have intermediate expertise of R and limited knowledge in statistics. I run the following simplified (removed control variables) regression:
model <- feols(RET ~ EUA_change * CE |
datadate + country + industry, data = dataset, cluster = c(“gvkey”,”datadate”))
where RET is the daily stock return (%), EUA_change is the daily carbon price change (%), and CE is a continuous carbon exposure variable (%). As a result, I obtain a highly significant coefficient for the interaction term of -0.005. Because I control for the day as a fixed effect, the EUA_change variable itself is removed due to collinearity.
I would like to plot the impact for a 1% change in the EUA price for a continuum of carbon exposure levels, i.e. simply the line with a slope of -0.005 and coefficient of 0. Should I just do this manually, or can I mirror the attached image and plot this relationship with a confidence interval?
I tried so far various functions e.g. the plot_slopes function from the package marginaleffects:
plot_slopes(model, variables = ‘EUA_change’, condition = ‘CE’)
Or also the plot_predictions function. I am aware that is not solely a code issue, but more understanding the logic respectively the statistics.
Many thanks for any support! (First time stack overflow user)
Ninyo Ruf is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.