xiongjerry 发表于 2015-3-15 20:01 
语法错误,是不是连续变量的位置放错了
连续变量的位置放错了是什么意思啊?
. stack a b c d,into(x) clear
. rename _stack treat
. egen id=seq(),t(8)
. sort id treat
. genrank rankx=x
. anova rankx id treat
Number of obs = 32 R-squared = 0.8207
Root MSE = 4.81905 Adj R-squared = 0.7353
Source | Partial SS df MS F Prob > F
-----------+----------------------------------------------------
Model | 2231.8125 10 223.18125 9.61 0.0000
|
id | 1473.75 7 210.535714 9.07 0.0000
treat | 758.0625 3 252.6875 10.88 0.0002
|
Residual | 487.6875 21 23.2232143
-----------+----------------------------------------------------
Total | 2719.5 31 87.7258065
. test _b[treat[1]]=_b[treat[2]]
( 1) treat[1] - treat[2] = 0
F( 1, 21) = 0.82
Prob > F = 0.3743
. test _b[treat[1]]=_b[treat[3]]
( 1) treat[1] - treat[3] = 0
F( 1, 21) = 8.14
Prob > F = 0.0095
. test _b[treat[1]]=_b[treat[4]]
( 1) treat[1] - treat[4] = 0
F( 1, 21) = 27.73
Prob > F = 0.0000
. test _b[treat[2]]=_b[treat[3]]
( 1) treat[2] - treat[3] = 0
F( 1, 21) = 3.78
Prob > F = 0.0652
. test _b[treat[2]]=_b[treat[4]]
( 1) treat[2] - treat[4] = 0
F( 1, 21) = 18.99
Prob > F = 0.0003
给的答案是这个,可是我按照这样打进去出不来一样的结果。。。求大神看看,非常感谢!!