# How to graph interaction effects for panel data

I have a pretty generic question which I am guessing could be relevant to many social scientists who deal with panel data sets. What are the best practices for making graphs about interaction effects.

There is a variety of articles that talk about packages like ggplot, ggplot2, sjPlot, effects and so on but to my knowledge none of them really takes into account multiple years and multiple individuals.

In my field of management what I see most often is the complete disregard for year and individual effects so that an interaction for instance gets fitted by one x-variable on the x-axis, a simple high versus low of the other interacting variable in the graph and the y-variable on the y-axis of course. A difference in slope then shows how the interaction results in different impact on the y-variable.

This seems pretty simplistic as it (if I understand correctly) pretty much erases everything idiosyncratic about panel data, so basically it disregards the fundamental reasons why panels are interesting for statistical inference. So hence my question to the broader community: How do you plot results (and interactions) from panel data.

I'd appreciate both general and coding suggestions :)

Some extra questions:

1. When you have a bunch of control variables, do you chose artificial values for all of them? What about time and individual variables?
2. Is there a way of plotting the difference in residuals between the regression without interaction effects and the ones with interactions (similar to marginal effects) that clarifies how the interacting variables affect the dependent (response) variable y?
3. While uncommon in management, can we draw 3 dimensional figures to show interactions?

Looking forward to your feedback and suggestions

$y_{it} = \beta_0 + x_{it} \beta_1 + D_{it} x_{it} \beta_2 + \tau_t +c_i + \epsilon_{it}$
Once you have estimated the model, you are right that you need to choose some values for $\tau_t$ and $c_i$ to plot the effects, but whatever values you choose only affect the intercept of the plot (not the slope) so they are usually only of secondary importance. Same with additional covariates that you include. Usually, you would set these at their mean value, but they will only affect the intercept of the plot.