为什么Stata anova和SAS glm之间的平方和不同?

时间:2013-10-12 20:30:00

标签: sas stata

anova y group hop

                       Number of obs =     206     R-squared     =  0.0331
                       Root MSE      = 20.0345     Adj R-squared =  0.0139

              Source |  Partial SS    df       MS           F     Prob > F
          -----------+----------------------------------------------------
               Model |  2761.85468     4  690.463671       1.72     0.1469
                     |
               group |  42.2798948     1  42.2798948       0.11     0.7459
                 hop |  2633.73186     3  877.910619       2.19     0.0907
                     |
            Residual |  80677.5664   201  401.380927   
          -----------+----------------------------------------------------
               Total |  83439.4211   205  407.021566   



 proc glm data=ccc;
    class group hop;
    model y=group hop;
    run;
                                                               Sum of
Source               DF         Squares     Mean Square    F Value    Pr > F

Model                 4      2761.79407       690.44852       1.72    0.1469

Error               201     80677.50607       401.38063

Corrected Total     205     83439.30014


      R-Square     Coeff Var      Root MSE    hbalcv27 Mean

      0.033099      129.8628      20.03449         15.42743


Source       DF       Type I SS     Mean Square    F Value    Pr > F
group         1      128.138891      128.138891       0.32    0.5727
HOP           3     2633.655176      877.885059       2.19    0.0907


Source       DF     Type III SS     Mean Square    F Value    Pr > F
group        1       42.289824       42.289824       0.11    0.7458
HOP          3     2633.655176      877.885059       2.19    0.0907

1 个答案:

答案 0 :(得分:1)

SAS和Stata数据集中的存储精度可能不同。计算也可以在不同的精度中完成。我不知道SAS,但根据比尔古尔德的这个blog

Stata does all calculations in double (and sometimes quad) precision.