I am trying to test for wage differentials over job types defined by the 8 levels of a three-way interaction. I can't figure out why the results are different when I use a lincom test of a specific combination of coefficients versus margins, over() to test each job type against the reference category.

I'm using xtreg, fe in Stata 16.1 to fit a fixed-effects (within person) regression of log wages on the three-way interaction (PT hours * 1yr tenure * unionized) and controls. Below I have included an example using the nlswork dataset, which has the same basic structure as my data.

I would appreciate any clarification or guidance you could offer on the appropriate command(s) for obtaining the predicted wage differential between job_type=1 (nonunion, FT, < 1yr tenure) and the other levels (e.g. job_type=4, nonunion, PT, >= 1yr tenure). I haven't found a comparable example using margins, over() in the manual or previous forum posts.


Code:
* Contrasting levels of a three-way interaction
// Use NLS sample data
webuse nlswork, clear

// Generate indicators for thresholds of continuous variables
gen pt_hrs = cond(hours < 35, 1, cond(!mi(hours), 0, .))
gen tenure_1yr = cond(tenure < 1, 0, cond(!mi(tenure), 1, .))

// Generate variable for 8 levels of three-way interaction
egen job_type = group(union pt_hrs tenure_1yr), label
tab job_type

// Fixed-effects regression of ln(wage) on three-way interaction and controls
xtset id year
xtreg ln_wage age ttl_exp i.south i.c_city i.union##i.pt_hrs##i.tenure_1yr i.occ_code, fe vce(robust)

// Wald test of (exponentiated) combination of coefficients
lincom 1.pt_hrs + 1.tenure_1yr + 1.pt_hrs#1.tenure_1yr, ef
* Predicted differential is 7.58% (s.e. = 0.015)

// Test using margins, over() with job_type == 1 (0 0 0) as reference
margins, over(r.job_type) post
lincom _b[r4vs1.job_type], ef
* Predicted differential is 10.1% (s.e. = 0.016)