Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Three Way Interaction Analysis with All Continous Variables and Testing for Slope Differences

    My question in this post refers to this particular website: https://stats.oarc.ucla.edu/stata/fa...tion-stata-12/

    It is important to note that I am still a junior researcher with limited knowledge of really advanced statistical methods.

    I am doing a research project using the three-way interaction statistical analysis approach (moderating regression analysis). I am using this particular UCLA website to guide my analysis.

    My question is regarding the Table below this portion:
    /* compute pairwise differences in simple slopes */
    What is the meaning of dy/dx in the Table? Is it a Cohen's d score? I asked this question because the editor requested me to: "testing for slope differences". I wondered if this is the statistical analysis the editor referred to for slope differences. Thank you for everyone's attention!
    Last edited by Ferdi Djajadisastra; 09 Jan 2025, 08:20.

  • #2
    It is estimating the slope at different values of the interacted terms.

    If you have,

    Y = b1*X *W *Z

    Then dY/dX is b1*W*Z

    So you compute at different values of W and Z.

    Comment


    • #3
      Originally posted by George Ford View Post
      It is estimating the slope at different values of the interacted terms.

      If you have,

      Y = b1*X *W *Z

      Then dY/dX is b1*W*Z

      So you compute at different values of W and Z.
      Thanks for the response, George. I think my question is actually what should I write for the headings of the Table for the dY/dX coefficient? Can I write it as Cohen's d? Thank you!

      Comment


      • #4
        It's not Cohen's D, so I wouldn't. Cohen's D is a standardized difference.

        What you have is a slope at different values of the interacted variables.

        "Marginal Effect of X at Z"

        In some fields, they are called "Simple Slopes".


        Comment


        • #5
          The dydx() function tells -margins- to report the derivative of y with respect to x--in other words the slope. From that UCLA page:

          We will use the margins comand to compute the simple slopes for the four values of w and z. We use the dydx option to obtain the slopes. Please note, we have manually annotated the output with the various combinations of w and z in parentheses.
          Notice too that an earlier -margins- table shows the 4 simple slopes. You can use the values in that table to compute "by hand" the same pairwise comparisons you get from the -margins- command you asked about. E.g.,

          Code:
          . /*
          > margins, dydx(x) at(w=($Hw $Lw) z=($Hz $Lz)) vsquish
          >
          > Average marginal effects                          Number of obs   =        200
          > Model VCE    : OLS
          >
          > Expression   : Linear prediction, predict()
          > dy/dx w.r.t. : x
          > 1._at        : z               =    61.75089
          >                w               =    62.01345
          > 2._at        : z               =    61.75089
          >                w               =    43.27655
          > 3._at        : z               =    41.94911
          >                w               =    62.01345
          > 4._at        : z               =    41.94911
          >                w               =    43.27655
          >
          > ------------------------------------------------------------------------------
          >              |            Delta-method
          >              |      dy/dx   Std. Err.      z    P>|z|     [95% Conf. Interval]
          > -------------+----------------------------------------------------------------
          > x            |
          >          _at |
          >           1  |   .0356648   .0951734     0.37   0.708    -.1508717    .2222012
          >           2  |   .1435565   .1371306     1.05   0.295    -.1252146    .4123276
          >           3  |    .498484   .1884961     2.64   0.008     .1290384    .8679296
          >           4  |   .0929561   .1236172     0.75   0.452    -.1493291    .3352413
          > ------------------------------------------------------------------------------
          > THIS TABLE SHOWS the 4 SIMPLE SLOPES */
          .
          . /* compute pairwise differences in simple slopes
          >
          > margins, dydx(x) at(w=($Hw $Lw) z=($Hz $Lz)) vsquish pwcompare(effects)
          >
          > Pairwise comparisons of average marginal effects
          > Model VCE    : OLS
          >
          > Expression   : Linear prediction, predict()
          > dy/dx w.r.t. : x
          > 1._at        : z               =    61.75089
          >                w               =    62.01345
          > 2._at        : z               =    61.75089
          >                w               =    43.27655
          > 3._at        : z               =    41.94911
          >                w               =    62.01345
          > 4._at        : z               =    41.94911
          >                w               =    43.27655
          >
          > ------------------------------------------------------------------------------
          >              |   Contrast Delta-method    Unadjusted           Unadjusted
          >              |      dy/dx   Std. Err.      z    P>|z|     [95% Conf. Interval]
          > -------------+----------------------------------------------------------------
          > x            |
          >          _at |
          >      2 vs 1  |   .1078917   .1559956     0.69   0.489     -.197854    .4136375
          >      3 vs 1  |   .4628192   .1955057     2.37   0.018     .0796352    .8460033
          >      4 vs 1  |   .0572913   .1557822     0.37   0.713    -.2480361    .3626188
          >      3 vs 2  |   .3549275   .2449055     1.45   0.147    -.1250785    .8349335
          >      4 vs 2  |  -.0506004   .1635762    -0.31   0.757    -.3712038    .2700031
          >      4 vs 3  |  -.4055279   .2096843    -1.93   0.053    -.8165015    .0054457
          > ------------------------------------------------------------------------------
          > THIS TABLE SHOWS PAIRWISE COMPARISONS AMONG THE 4 SIMPLE SLOPES
          > */
          .
          . * COMPUTE THOSE PAIRWISE COMPRISONS "BY HAND" USING SLOPES FROM THE 1ST TABLE
          . display _newline ///
          > "2 vs 1: ".1435565 - .0356648  _newline ///
          > "3 vs 1: ".498484 - .0356648  _newline ///
          > "4 vs 1: ".0929561 - .0356648  _newline ///
          > "3 vs 2: ".498484 - .1435565  _newline ///
          > "4 vs 2: ".0929561 - .1435565  _newline ///
          > "4 vs 3: ".0929561 - .498484
          
          2 vs 1: .1078917
          3 vs 1: .4628192
          4 vs 1: .0572913
          3 vs 2: .3549275
          4 vs 2: -.0506004
          4 vs 3: -.4055279

          I hope this helps to clarify things.

          --
          Bruce Weaver
          Email: [email protected]
          Version: Stata/MP 18.5 (Windows)

          Comment


          • #6
            Thank you Bruce and George for the clarification! Woops, I guess I made an embarassing mistake in my manuscript. So, I need to change "Cohen's d" in the Table heading with "dy/dx coefficient". Once again, thank you very much for the clarification. It is sometimes difficult to navigate the latest development of statistical analysis.

            Comment


            • #7
              Cohen's D is a like a t-statistic unadjusted for sample size, also called a standardized difference.

              Comment

              Working...
              X