Hi,

I hope you had a merry Christmas.

Currently I face difficulties on how to pairwise t-test a three-way interaction in order to understand which slopes are different from each other. However, I could not find a post with the same issue. Without interaction effects, the <test> command seems to work for slope comparisons but I failed to properly specify the command.


Example: Let's assume we have a basic three-way interaction in a tobit model with a three-way interaction among A, B, and C using robust standard errors clustered by D.
Code:
 tobit Y c.A##B##C, vce(cluster D) ll(0)
Using the margins command, I can calculate the slopes and get the 95% confidence intervals of the four combinations of A, B, and C.
Code:
  margins, dydx(A) at(B=(0 1) C=(0 1))
The real output looks like the following below. I can already see that based on 95% confidence intervals, all four slopes overlap. When I use the standard error and calculate 90% confidence intervals, they don't overlap for slope 1 and slope 2.
. margins, dydx(LBooktomarket) at(LFF_UO_lar5to50=(0 1) LFF_UO_Mgmt=(0 1))

Average marginal effects Number of obs = 3,194
Model VCE : Robust

Expression : Linear prediction, predict()
dy/dx w.r.t. : LBooktomarket

1._at : LFF_UO_Mgmt = 0
LFF_U~r5to50 = 0

2._at : LFF_UO_Mgmt = 0
LFF_U~r5to50 = 1

3._at : LFF_UO_Mgmt = 1
LFF_U~r5to50 = 0

4._at : LFF_UO_Mgmt = 1
LFF_U~r5to50 = 1

-------------------------------------------------------------------------------
| Delta-method
| dy/dx Std. Err. t P>|t| [95% Conf. Interval]
--------------+----------------------------------------------------------------
LBooktomarket |
_at |
1 | -.0013346 .0033915 -0.39 0.694 -.0079844 .0053151
2 | .0323928 .0168608 1.92 0.055 -.0006666 .0654522
3 | .0233028 .0114768 2.03 0.042 .0007999 .0458057
4 | .0050212 .0143031 0.35 0.726 -.0230232 .0330657
-------------------------------------------------------------------------------
However, to report the data properly, I want to calculate the pairwise t-test for all combinations: (1) vs. (2), (1) vs. (3), (1) vs. (4), (2) vs. (3), (2) vs. (4), and (3) vs. (4). Do you have any tips how the 'test' command needs to be specified or are there other Stata commands that allow pairwise t-tests for three-way interaction slopes?

Thank you very much.

Best,
Martin