Dear Statalisters,

In my model, I have two moderation effects which I would like to compare using the nlcom command. The issue is that these are moderations of quadratic terms.

Let me explain with the example below.

Code:
webuse regress, clear
reg y c.x1##c.x1##c.x2 c.x3##c.x3##c.x2, noomitted
note: x2 omitted because of collinearity

      Source |       SS           df       MS      Number of obs   =       148
-------------+----------------------------------   F(9, 138)       =     38.99
       Model |  3507.64063         9  389.737848   Prob > F        =    0.0000
    Residual |  1379.27829       138   9.9947702   R-squared       =    0.7178
-------------+----------------------------------   Adj R-squared   =    0.6994
       Total |  4886.91892       147  33.2443464   Root MSE        =    3.1615

------------------------------------------------------------------------------
           y |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
          x1 |   -4.65257   13.16276    -0.35   0.724    -30.67935    21.37421
             |
   c.x1#c.x1 |   .8658995    2.27483     0.38   0.704     -3.63213    5.363929
             |
          x2 |  -42.47076    101.423    -0.42   0.676    -243.0147    158.0732
             |
   c.x1#c.x2 |   33.62988   57.65397     0.58   0.561    -80.36953    147.6293
             |
   c.x1#c.x1#|
        c.x2 |  -5.452162   8.488162    -0.64   0.522    -22.23584    11.33151
             |
          x3 |  -.0129249   .0033161    -3.90   0.000    -.0194818   -.0063681
             |
   c.x3#c.x3 |   1.09e-06   5.15e-07     2.11   0.037     6.85e-08    2.10e-06
             |
   c.x3#c.x2 |  -.0062143   .0130708    -0.48   0.635    -.0320593    .0196308
             |
   c.x3#c.x3#|
        c.x2 |   1.54e-06   2.51e-06     0.61   0.541    -3.42e-06    6.50e-06
             |
       _cons |   56.37686   18.93592     2.98   0.003     18.93479    93.81893
------------------------------------------------------------------------------
x2 is the moderating variable. My theoretical hypothesis is about comparing the following beta coefficients:
_b[c.x1#c.x1#c.x2] and _b[c.x3#c.x3#c.x2]

In some (management) papers, I have read that simply using the test command (i.e. test _b[c.x1#c.x1#c.x2] = _b[c.x3#c.x3#c.x2]) is not correct because the size of the main effects needs to be considered because a large interaction effect does not necessarily mean that the interaction effect is substantively important. For example, when linear effects are moderated, the following should be used:

Code:
webuse regress, clear
quietly reg y c.x1##c.x2 c.x3##c.x2, noomitted
nlcom (ratio1: _b[c.x1#c.x2]/_b[x1]) (ratio2: _b[c.x3#c.x2]/_b[x3]), post
test _b[ratio1] = _b[ratio2]
In my case, quadratic effects are being moderated. My question is what should one do when two different quadratic effects are being moderated? Can I simply do the following (building on the logic above)?

Code:
webuse regress, clear
quietly reg y c.x1##c.x1##c.x2 c.x3##c.x3##c.x2, noomitted
nlcom (ratio1: _b[c.x1#c.x1#c.x2]/_b[c.x1#c.x1]) (ratio2: _b[c.x3#c.x3#c.x2]/_b[c.x3#c.x3]), post
test _b[ratio1] = _b[ratio2]
There are, however, also other terms involved, i.e. _b[c.x1#c.x2], _b[c.x3#c.x2], _b[x1], and _b[x3].
Do these terms need to somehow be incorporated in the computations above?