Dear all,

I am reading a paper that analyses a panel data model with an interaction term. I wonder how to calculate the marginal effect and confidence interval for the model and present the results in graphs, especially how to calculate the confidence interval. Hope someone could kindly help with the syntax.

The equation below is estimated with fixed-effect OLS: Array





And the marginal effect of ineq on y is: Array





All the variables are continuous variables. When k/h is 0, the marginal effect of ineq equals to a2.

The graph below shows the line of marginal effect with its confidence interval, along with a histogram of k/h (physical-human capital ratio): Array






It can be seen from the graph that when k/h is 0, the marginal effect of ineq is significantly negative.

How could I calculate the confidence interval and generate a graph like this in Stata? What should the syntax be like?

Many thanks,

Anna