Announcement

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

  • #16
    Your interpretations of the red and blue lines are, indeed, correct. The red line tells you that the difference in OUT differs significantly between GRPs 1 and 0 when CONCEN = 0. Only you can say what that means in the real world. The blue line is an omnibus hypothesis test. The null hypothesis for this test is that the expected value of OUT in GRPs 0 and 1 are the same at all values of CONCEN--and that hypothesis is resoundingly rejected.

    For your second concern, because CONCEN was entered into the model as a continuous variable (c.CONCEN), you cannot use it in that way with the -margins- command, nor its near-relatives. But you can get the contrast you are seeking (OUT at CONCEN = 3 vs CONCEN = 0 in GRP 0) using -lincom- instead. To do this correctly you have to back to the two-equation interpretation of the model that I showed in #12. In GRP 0 at CONCEN = 3, the model predicts an expected value of _cons + _b[CONCEN]*3. At CONCEN = 0, it is _cons + _b[CONCEN]*0 = _cons. So the difference, when we subtract, is just _b[CONCEN]*(3-0) = 3*_b[CONCEN]. To get an estimate of this difference along with a standard error and confidence interval and p-value, you can just issue the command
    Code:
    lincom 3*CONCEN
    Now, in this case, using -lincom- is, in a sense, overkill: you could just multiply the coefficient, standard error, and CI bounds for CONCEN from the regression table output by 3, and the p-value is identical to that in the regression table. But I wrote out all those steps because there may be more complicated contrasts you are interested in that won't reduce to a simple multiple of a line in the regression table. This -lincom- approach is what we used to use before -margins- was created.

    Finally, you raise the question of what, if anything, to do about multiple comparisons. This is a very thorny issue, and if you ask a dozen statisticians you will probably get 25 different answers. In some fields there are strong traditions that dictate how this must be done to get your result published. My experience as an epidemiologist who publishes mostly in clinical and public health journals is that pretty much anything is acceptable provided you state in your methods section what you have (or haven't) done. My personal practice, absent a rebuke by a reviewer, is to do no adjustment for multiple comparisons and say so up front. (I have my reasons for this, but I don't really want to digress into an area of discussion that typically generates much heat and little light). But if you have a particular audience or journal in mind for your results, you should check to see what the conventions are there and follow that.

    Comment


    • #17
      Dear Clyde,

      Once again, many thanks - that's really helpful. I think I've got it, but just to be sure, I've referred to your original equations, and used an example with the slightly more complicated GRP=1 below:

      Code:
      . xtmixed OUT i.GRP##c.CONCEN || id: CONCEN, mle variance
      
      ------------------------------------------------------------------------------
               OUT |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
      -------------+----------------------------------------------------------------
             1.GRP |   18.73228   8.295914     2.26   0.024     2.472583    34.99197
            CONCEN |  -1.495238   .5285768    -2.83   0.005     -2.53123   -.4592467
                   |
      GRP#c.CONCEN |
                1  |   2.635238   .7285928     3.62   0.000     1.207222    4.063254
                   |
             _cons |   38.20106   6.018489     6.35   0.000     26.40504    49.99708
      ------------------------------------------------------------------------------
      
      Group 0: OUT = b0 + b1*CONC + error
      Group 1: OUT = c0 + c1*CONC + error
      
      b0 = _cons, b1 = _b[CONCEN]
      c0 = _cons + _b[1.GRP], c1 = _b[CONCEN] + _b[1.GRP#CONCEN]
      So, if I've understood correctly, this is where the coefficients in your equations come from (colour-matched).

      As an example for GRP1 between CONCEN3 and CONCEN0:

      At 0
      _cons + _b[1.GRP] + (_b[CONCEN] + _b[1.GRP#CONCEN])* CONCEN

      At 3
      _cons + _b[1.GRP] + (_b[CONCEN] + _b[1.GRP#CONCEN])* CONCEN

      Difference:

      = (_b[CONCEN] + _b[1.GRP#CONCEN])* CONCEN

      = (_b[CONCEN] + _b[1.GRP#CONCEN])* 3

      = (-1.495 + 2.635) * 3

      = 3.42

      which is the same as I get with (albeit without p-value and CIs)
      Code:
      . lincom 3*(CONCEN + 1.GRP#c.CONCEN)
      
       ( 1)  3*[OUT]CONCEN + 3*[OUT]1.GRP#c.CONCEN = 0
      
      ------------------------------------------------------------------------------
               OUT |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
      -------------+----------------------------------------------------------------
               (1) |       3.42   1.504356     2.27   0.023     .4715167    6.368483
      ------------------------------------------------------------------------------
      And, as the p-value for this is 0.023, this suggests there is a significant difference between CONCEN 3 and 0 for GRP1, right?

      Actually, using the equation approach has made me realise something else - the coefficient and p-value will be the same for any combination of CONCEN comparisons within a group where the difference between CONCEN values is the same - is that right? For example, checking (within GRP 0) for a difference between CONCEN 1 and 4, or 2 and 5, or 3 and 0, because the model is a linear prediction.

      Finally, thanks for the info re: multiple comparisons. Useful to know there is debate even amongst statisticians!

      Jem

      Comment


      • #18
        Many thanks Clyde. I couldn't have explained it better.
        Roman

        Comment


        • #19
          Originally posted by Jem Lane View Post
          Actually, using the equation approach has made me realise something else - the coefficient and p-value will be the same for any combination of CONCEN comparisons within a group where the difference between CONCEN values is the same - is that right? For example, checking (within GRP 0) for a difference between CONCEN 1 and 4, or 2 and 5, or 3 and 0, because the model is a linear prediction.

          Jem
          That's right. You will get same test results for any combination within group as the model is assumed to be linear.
          Roman

          Comment


          • #20
            Thanks Roman.

            Jem

            Comment


            • #21
              Hi Clyde,
              Realise you've been more than generous with your help. I thought I'd ask you rather than re-post... I'd like to check I have understood your advice properly re: the two equation approach and lincom (my entry on 5 December @18:28). I have read the entry on lincom in the pdf documentation and I think I've got it, but before I run a whole load of analysis, I'd prefer to be sure. For GRP=0 it seems easy, but want to make sure I've understood what happens with GRP=1 where the interaction term and _cons adjustment come into play.
              Many thanks

              Jem

              Comment

              Working...
              X