Announcement

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

  • #16
    And that, Dave, is the answer that've been looking for! You identified the point that I was overlooking...correction for FWER!

    Thank you, so much!
    Stata 14.2MP
    OS X

    Comment


    • #17
      There's no conflict between testparm and margins or regress's regression table. Take a look at what testparm says it's doing. They're testing different things: a joint null hypothesis (likewise with ANOVA) versus individual comparisons to the omitted baseline. What did your protocol say you were going to do?

      Comment


      • #18
        First things first. Your doubts, hereby a couple of times clarified, relate to simple regression's as well as one-way ANOVA's core principles. The explanation is usually found in the first pages of any decent textbook. I believe everybody in this Forum will agree that we must have a sound knowledge of both strategies of estimation so as to proceed with the "real-world" analysis, which will usually demand more complex models. Please take some time to grasp information on the basic concepts before jumping to the statistical analysis. Rest assured the reward will be great.
        Best regards,

        Marcos

        Comment


        • #19
          Originally posted by Joseph Coveney View Post
          There's no conflict between testparm and margins or regress's regression table. Take a look at what testparm says it's doing.
          To be honest, I wasn't sure what is was doing. Even after reading the State manual.

          They're testing different things: a joint null hypothesis (likewise with ANOVA) versus individual comparisons to the omitted baseline. What did your protocol say you were going to do?
          I wish to compare the levels of the endogenous metabolite in the treatment groups against the control.

          But, in case you think I'm being obtuse (and I admit that I'm no statistician), here's another example from the same data set. This time, the dose-response is clear and significant:

          Code:
          * Example generated by -dataex-. To install: ssc install dataex
          clear
          input int dose double response2
            0 .003192307692307692
            0 .006386363636363636
            0  .00450381679389313
           10  1.2737819025522044
           10  1.2633228840125392
           10  1.2972972972972974
           10  2.8341708542713566
           10   5.055555555555555
           50  12.352941176470587
           50   4.388571428571429
           50   7.451737451737452
           50   5.728476821192054
           50   6.473684210526317
          100  12.569269521410579
          100  10.555555555555555
          100  10.587301587301589
          100  10.833333333333334
          100   9.278350515463917
          200             42.1875
          200  39.075630252100844
          200  38.983050847457626
          200  43.333333333333336
          200   40.28776978417267
          end
          Now, regression:
          Code:
          . regress  response2 i.dose 
          
                Source |       SS           df       MS      Number of obs   =        23
          -------------+----------------------------------   F(4, 18)        =    335.68
                 Model |  5117.72301         4  1279.43075   Prob > F        =    0.0000
              Residual |  68.6057438        18  3.81143021   R-squared       =    0.9868
          -------------+----------------------------------   Adj R-squared   =    0.9838
                 Total |  5186.32875        22  235.742216   Root MSE        =    1.9523
          
          ------------------------------------------------------------------------------
             response2 |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
          -------------+----------------------------------------------------------------
                  dose |
                   10  |   2.340132    1.42575     1.64   0.118    -.6552579    5.335521
                   50  |   7.274388    1.42575     5.10   0.000     4.278999    10.26978
                  100  |   10.76007    1.42575     7.55   0.000     7.764679    13.75546
                  200  |   40.76876    1.42575    28.59   0.000     37.77337    43.76415
                       |
                 _cons |   .0046942   1.127154     0.00   0.997    -2.363369    2.372757
          ------------------------------------------------------------------------------
          
          . pwcompare dose, mcompare(dunnett)
          
          Pairwise comparisons of marginal linear predictions
          
          Margins      : asbalanced
          
          ---------------------------
                       |    Number of
                       |  Comparisons
          -------------+-------------
                  dose |            4
          ---------------------------
          
          --------------------------------------------------------------
                       |                                  Dunnett
                       |   Contrast   Std. Err.     [95% Conf. Interval]
          -------------+------------------------------------------------
                  dose |
            10 vs   0  |   2.340132    1.42575     -1.475284    6.155547
            50 vs   0  |   7.274388    1.42575      3.458972     11.0898
           100 vs   0  |   10.76007    1.42575      6.944652    14.57548
           200 vs   0  |   40.76876    1.42575      36.95335    44.58418
          --------------------------------------------------------------
          Note: The dunnett method requires balanced data for proper
                level coverage. A factor was found to be unbalanced.
          If -testparm- is comparing differences from reference, and the values before were all zero because there are no differences, now I should have some non-zero values:

          Code:
          . testparm i.dose
          
           ( 1)  10.dose = 0
           ( 2)  50.dose = 0
           ( 3)  100.dose = 0
           ( 4)  200.dose = 0
          
                 F(  4,    18) =  335.68
                      Prob > F =    0.0000
          Nope, not even close. So I have no clue as to what this is telling me. The Stata manual wasn't that intuitive.

          Stata 14.2MP
          OS X

          Comment


          • #20
            Testparm is comparing the joint null hypothesis that 10.dose = 0, 50.dose = 0, 100.dose = 0, and 200.dose = 0. If this is the only factor in your model this will be the same as the overall F omnibus test, like from your ANOVA. In fact you can see the same F value twice in your output as you should in this case.

            Comment


            • #21
              Originally posted by Dave Airey View Post
              Testparm is comparing the joint null hypothesis that 10.dose = 0, 50.dose = 0, 100.dose = 0, and 200.dose = 0. If this is the only factor in your model this will be the same as the overall F omnibus test, like from your ANOVA. In fact you can see the same F value twice in your output as you should in this case.
              The light is dawning...thank you, Dave.
              Stata 14.2MP
              OS X

              Comment

              Working...
              X