Hello everyone,

I run xtnbreg for the panel data and would like to use predict/margins following this regression.

xtnbreg dep ind1 ind2 c.ind3##c.ind4 $controlsDummies
margins, at(ind3=(0(0.1)1) ind4=(0.1 0.4)) level(99)
marginsplot

I also would like to plot a two-way graph for the interacted variables to check their joint effect on the predicted dependent variable (dep_hat).

twoway (lfitci dep_hat v3 if v4<=0.1 ,level(99) color(black) ytitle(dep_hat) xtitle(v3)) (lfitci dep_hat v3 if v4>=0.4,level(99) color(red) ytitle(dep_hat) xtitle(v3))

The problem is Stata says that the predictions are linear.
Does this mean that I need to take the exp(dep_hat) to see the real predicted values of the dependent variable? (because I have negative binomial)

Looking forward to your reply,
Thank you very much in advance for your support.