Announcement

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

  • Post hoc testing for trend among coefficients

    Hello users

    I'm looking to see if it is possible to test for trend among coefficients after fitting a regression model. For example using an artifactual example:

    Code:
    sysuse citytemp.dta , clear
    regress tempjuly i.region
    Region has 4 categories and I might, for example, wish to test whether the effect associated with region 2 on the outcome >= the effect of region 3 >= effect on region 1 (0 in this instance as it's the reference category). I'm only testing effects associated with select categories and not all categories of region. The exact post hoc hypotheses reflect substantive theory underlying the actual model fitting process.

    The Stata FAQ

    https://www.stata.com/support/faqs/s...-coefficients/

    allows for testing whether one effect is greater than another, but my reading is that this approach can't be expanded as above as the Wald chi-squared degrees of freedom with be greater than 1 thus violating the distributional assumptions. Is such an approach possible? I would conventionally define my null hypothesis such that the effects do not vary significantly between each other and proceed from there, but am exploring whether the above approach is possible. I would be interested to hear if anyone has tried something similar. Thank you.

  • #2
    Originally posted by Ronald McDowell View Post
    I'm looking to see if it is possible to test for trend among coefficients after fitting a regression model. . . . Region has 4 categories and I might, for example, wish to test whether the effect associated with region 2 on the outcome >= the effect of region 3 >= effect on region 1. . . whether the above approach is possible.
    In your example case, wouldn't it be something like
    Code:
    test (2.region = 3.region) (3.region = 1.region)
    
    // or
    
    margins 1.region 2.region 3.region, contrast
    paying attention to the signs of the contrasts? (You can use margins in order to see the cell means.)

    Comment


    • #3
      Thank you for replying. What you've specified is exactly where I would usually start. The null hypothesis is that there is no difference in the effect on the outcome between the three regions, the (2 sided) alternative hypothesis is that there is a difference, and if the evidence is in favour of the alternative hypothesis I would then look at the cell means and comment/report accordingly etc. But in this instance my null hypothesis is the effect for Region 2>= Region3>=Region1, and the alternative hypothesis is Not (Region 2>= Region3>=Region1), so there is a subtle distinction and the pvalues will not be identical.

      Comment


      • #4
        Originally posted by Ronald McDowell View Post
        . . . there is a subtle distinction and the pvalues will not be identical.
        The distinction is that yours is a directional hypothesis and that's why you look at the cell means (or alternatively at the sign of the contrast). You would not reject the null hypothesis if the realized direction is against your alternative hypothesis. The only difference in the p-values is that they're halved, again because of the directional nature of the null-alternative hypothesis pair.

        It's the same as if you were performing a one-tailed Student's t-test except that you're conducting two in tandem.

        Comment


        • #5
          Thank you very much, that's very helpful.

          Comment

          Working...
          X