Announcement

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

  • anova and post hoc


    Is it possible that the anova is not significant for the interaction effect (e.g. diagnosis and time) and then by doing the post hoc tests we find significance in some comparisons of the interactions? thanks in advance to everybody

  • #2
    Tommaso:
    yes, it is.
    Code:
    use "C:\Program Files\Stata18\ado\base\a\auto.dta"
    . anova price i.foreign#i.rep78 i.foreign i.rep78
    
                             Number of obs =         69    R-squared     =  0.0428
                             Root MSE      =    3008.49    Adj R-squared = -0.0670
    
                      Source | Partial SS         df         MS        F    Prob>F
               --------------+----------------------------------------------------
                       Model |   24684607          7   3526372.4      0.39  0.9049
                             |
               foreign#rep78 |   16312126          2   8156062.8      0.90  0.4115
                     foreign |  395125.95          1   395125.95      0.04  0.8352
                       rep78 |    6609429          4   1652357.3      0.18  0.9466
                             |
                    Residual |  5.521e+08         61   9051022.2  
               --------------+----------------------------------------------------
                       Total |  5.768e+08         68   8482308.2  
    
    . margins i.foreign#i.rep78
    
    Adjusted predictions                                        Number of obs = 69
    
    Expression: Linear prediction, predict()
    
    -------------------------------------------------------------------------------
                  |            Delta-method
                  |     Margin   std. err.      t    P>|t|     [95% conf. interval]
    --------------+----------------------------------------------------------------
    foreign#rep78 |
      Domestic#1  |     4564.5   2127.325     2.15   0.036      310.651    8818.349
      Domestic#2  |   5967.625   1063.662     5.61   0.000     3840.701    8094.549
      Domestic#3  |   6607.074   578.9845    11.41   0.000     5449.323    7764.825
      Domestic#4  |   5881.556   1002.831     5.86   0.000     3876.272    7886.839
      Domestic#5  |     4204.5   2127.325     1.98   0.053    -49.34897    8458.349
       Foreign#1  |          .  (not estimable)
       Foreign#2  |          .  (not estimable)
       Foreign#3  |   4828.667   1736.953     2.78   0.007     1355.414     8301.92
       Foreign#4  |   6261.444   1002.831     6.24   0.000     4256.161    8266.728
       Foreign#5  |   6292.667   1002.831     6.27   0.000     4287.383     8297.95
    -------------------------------------------------------------------------------
    
    .
    . regress price i.foreign#i.rep78 i.foreign i.rep78
    note: 1.foreign#1b.rep78 identifies no observations in the sample.
    note: 1.foreign#2.rep78 identifies no observations in the sample.
    note: 1.foreign#5.rep78 omitted because of collinearity.
    
          Source |       SS           df       MS      Number of obs   =        69
    -------------+----------------------------------   F(7, 61)        =      0.39
           Model |    24684607         7  3526372.43   Prob > F        =    0.9049
        Residual |   552112352        61  9051022.16   R-squared       =    0.0428
    -------------+----------------------------------   Adj R-squared   =   -0.0670
           Total |   576796959        68  8482308.22   Root MSE        =    3008.5
    
    -------------------------------------------------------------------------------
            price | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
    --------------+----------------------------------------------------------------
    foreign#rep78 |
       Foreign#1  |          0  (empty)
       Foreign#2  |          0  (empty)
       Foreign#3  |  -3866.574   2980.505    -1.30   0.199    -9826.462    2093.314
       Foreign#4  |  -1708.278   2746.365    -0.62   0.536    -7199.973    3783.418
       Foreign#5  |          0  (omitted)
                  |
          foreign |
         Foreign  |   2088.167   2351.846     0.89   0.378     -2614.64    6790.974
                  |
            rep78 |
               2  |   1403.125   2378.422     0.59   0.557    -3352.823    6159.073
               3  |   2042.574   2204.707     0.93   0.358    -2366.011    6451.159
               4  |   1317.056   2351.846     0.56   0.578    -3385.751    6019.863
               5  |       -360   3008.492    -0.12   0.905    -6375.851    5655.851
                  |
            _cons |     4564.5   2127.325     2.15   0.036      310.651    8818.349
    -------------------------------------------------------------------------------
    
    . margins i.foreign#i.rep78
    
    Adjusted predictions                                        Number of obs = 69
    Model VCE: OLS
    
    Expression: Linear prediction, predict()
    
    -------------------------------------------------------------------------------
                  |            Delta-method
                  |     Margin   std. err.      t    P>|t|     [95% conf. interval]
    --------------+----------------------------------------------------------------
    foreign#rep78 |
      Domestic#1  |     4564.5   2127.325     2.15   0.036      310.651    8818.349
      Domestic#2  |   5967.625   1063.662     5.61   0.000     3840.701    8094.549
      Domestic#3  |   6607.074   578.9845    11.41   0.000     5449.323    7764.825
      Domestic#4  |   5881.556   1002.831     5.86   0.000     3876.272    7886.839
      Domestic#5  |     4204.5   2127.325     1.98   0.053    -49.34897    8458.349
       Foreign#1  |          .  (not estimable)
       Foreign#2  |          .  (not estimable)
       Foreign#3  |   4828.667   1736.953     2.78   0.007     1355.414     8301.92
       Foreign#4  |   6261.444   1002.831     6.24   0.000     4256.161    8266.728
       Foreign#5  |   6292.667   1002.831     6.27   0.000     4287.383     8297.95
    -------------------------------------------------------------------------------
    
    .
    Kind regards,
    Carlo
    (StataNow 18.5)

    Comment


    • #3
      Thanks a lot Carlo Lazzaro
      IS THE OPPOSITE ALSO POSSIBLE? THE ANOVA IS SIGNIFICANT FOR THE DIAGNOSIS EFFECT (FOR EXAMPLE) and subsequently, by doing the post hoc nothing significant comes out? How could we explain these things? (I'm also referring to the question from last time). Thank you very much in advance

      Comment

      Working...
      X