I suspect that the macro simply computes predictive margins for TREATMENT and its marginal effect (difference in margins) which is supported by the following Margins macro call producing the same estimates and confidence limits (matches the Wald limits). See the Margins macro documentation.
%margins(data=flies, class=treatment, classgref=first, response=death40, roptions=event='1',
model=treatment thorax, dist=binomial,
margins=treatment, diff=all, options=cl reverse)
Unfortunately, the Margins macro does not handle the multinomial model.
... View more