Hi all,

I'd like to save margins pairwise comparisons (contrast, standard error and p-value) in locals. However, from the matrix of results, I can only retrieve the contrast. Does anyone know if it's feasible?

Thank you

Code:
sysuse auto.dta
set seed 20210604
gen random=runiform()
sort foreign random
gen foreign2=0 in 1/26
replace foreign2=1 in 27/52
replace foreign2=2 if missing(foreign2)
gen rep78_2=cond(inrange(rep78, 4, 5), 1, cond(inrange(rep78, 1, 3), 0, .))
regress price i.foreign2#i.rep78_2 mpg
margins i.foreign2#i.rep78_2, pwcompare(pveffects)
mat b=r(table)
mat li b