Announcement

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

  • Differents results depending order of independent variables in ANOVA

    Hi all,

    I am having differents results in a Anova analysis depending order of independent variables, to replicate this I use Casella (2008) datasets and sequential Sum of squares:

    Code:
    clear all
    set more off
    input Diet    Tank    WtGain
    1    1    9.759
    1    1    7.399
    1    1    -0.209
    1    1    2.204
    1    1    0.267
    1    1    3.002
    1    2    8.031
    1    2    6.25
    1    2    0.134
    1    2    4.594
    1    2    4.414
    1    2    9.816
    1    3    -2.23
    1    3    9.69
    1    3    -2.239
    1    3    9.499
    1    3    6.927
    1    3    3.449
    1    4    4.274
    1    4    7.52
    1    4    12.141
    1    4    4.828
    1    4    3.391
    1    4    3.621
    2    5    21.819
    2    5    6.503
    2    5    31.596
    2    5    24.633
    2    5    15.73
    2    5    22.231
    2    6    11.672
    2    6    26.479
    2    6    19.784
    2    6    20.884
    2    6    21.811
    2    6    26.344
    2    7    22.161
    2    7    16.429
    2    7    23.311
    2    7    21.983
    2    7    12.181
    2    7    18.252
    2    8    30.865
    2    8    17.875
    2    8    24.562
    2    8    20.442
    2    8    20.791
    2    8    19.44
    3    9    47.588
    3    9    38.219
    3    9    44.445
    3    9    47.115
    3    9    30.83
    3    9    58.708
    3    10    62.477
    3    10    29.834
    3    10    49.902
    3    10    59.946
    3    10    46.587
    3    10    38.567
    3    11    54.545
    3    11    38.846
    3    11    52.163
    3    11    43.141
    3    11    27.822
    3    11    58.025
    3    12    57.749
    3    12    47.737
    3    12    40.653
    3    12    45.344
    3    12    46.702
    3    12    50.091
    end
    
    . anova WtGain Diet Tank, sequential
    
                               Number of obs =      72     R-squared     =  0.8738
                               Root MSE      = 7.17084     Adj R-squared =  0.8506
    
                      Source |    Seq. SS     df       MS           F     Prob > F
                  -----------+----------------------------------------------------
                       Model |  21355.5538    11  1941.41398      37.76     0.0000
                             |
                        Diet |  21247.7397     2  10623.8699     206.61     0.0000
                        Tank |  107.814082     9  11.9793424       0.23     0.9883
                             |
                    Residual |  3085.25287    60  51.4208811  
                  -----------+----------------------------------------------------
                       Total |  24440.8067    71  344.236714  
    
    . anova WtGain Tank Diet , sequential
    
                               Number of obs =      72     R-squared     =  0.8738
                               Root MSE      = 7.17084     Adj R-squared =  0.8506
    
                      Source |    Seq. SS     df       MS           F     Prob > F
                  -----------+----------------------------------------------------
                       Model |  21355.5538    11  1941.41398      37.76     0.0000
                             |
                        Tank |  21355.5538    11  1941.41398      37.76     0.0000
                        Diet |           0     0
                             |
                    Residual |  3085.25287    60  51.4208811  
                  -----------+----------------------------------------------------
                       Total |  24440.8067    71  344.236714
    Do you know why?

    Thanks in advance
    Regards
    Rodrigo

  • #2
    Since Diet is constant within each value of Tank, once Tank is used, Diet provides no additional information.

    Comment


    • #3
      Rodrigo:
      what you experienced is explained, also in graphical terms, in https://www.stata.com/bookstore/hand...nalyses-stata/, pages 104-108.
      Kind regards,
      Carlo
      (Stata 19.0)

      Comment


      • #4
        Thanks William and Carlo for you reply. I appreciate it.
        Regards
        Rodrigo

        Comment

        Working...
        X