Dear Stata user,

I would like to have predicted mean immigrant-native wage gaps on the vertical axis and years since migration (ysm) on the horizontal axis and generate such a profile based on the following simple regression pooling immigrants and natives:
Code:
regress logwage im ysm im#i.ysm
where im is a binary variable equal one if immigrant and equal zero if native.
Code:
margins i.ysm
generates the predicted logwage values. I treat years since migration as a set of binary variables where ysm ranges from 0 through 50 years.
Code:
marginsplot, x(ysm) recast(scatter)
produces the plot with ysm on the horizontal axis.

I have no clue how to get the predicted mean immigrant native wage gap on the vertical axis!?

I would appreciate some thoughts on this.

Thank you very much in advance.

Nico