楼主: lnlhckao123
1875 8

[问答] 200论坛币请问方差分析后两两比较的问题 [推广有奖]

  • 0关注
  • 3粉丝

副教授

62%

还不是VIP/贵宾

-

威望
0
论坛币
14810 个
通用积分
10.6125
学术水平
7 点
热心指数
4 点
信用等级
4 点
经验
12566 点
帖子
754
精华
0
在线时间
405 小时
注册时间
2010-8-21
最后登录
2025-6-7

楼主
lnlhckao123 发表于 2013-5-7 18:33:56 |AI写论文
200论坛币
请问高手,我的数据如下,我用下列程序,可以运算出如下结果,但是我如果不用宏程序,则无法得出如下结果,都是lsd检验,为什么要用宏程序才可以得出如下两两比较的结果,请高手指点!谢谢!
data b5;
  input x3 c @@;
cards;
  1.22    1    .8409          2       .1216      3      .7120      4     .8333      5
  1.34    1    .6974      2       .2316      3      .5905      4     .9240      5
  1.13    1    .8409      2       .4475             3      .7120      4     .7117      5
  1.43    1    .7792      2       .9659             3      .8950      4     .6624      5
  1.53    1   1.2924      2       .5786      3      .2535      4     .3237      5
  1.26    1    .7738      2       .4353             3      .3439      4     .7303      5
;

%let digits=10;
proc template;
define column Common.pValue;
notes "Default p-value column";
just = r;
format = pvalue%eval(&digits+2).&digits;
end;
run;

proc anova data=b5;
  class c;
  model x3=c;
  means c/hovtest dunnett snk duncan lsd;
run;


用宏程序后结果如下:

The ANOVA Procedure

                                                   t Tests (LSD) for x3

             NOTE: This test controls the Type I comparisonwise error rate, not the experimentwise error rate.


                                           Alpha                            0.05
                                           Error Degrees of Freedom           25
                                           Error Mean Square            0.051178
                                           Critical Value of t           2.05954
                                           Least Significant Difference    0.269


                              Comparisons significant at the 0.05 level are indicated by ***.


                                                   Difference
                                         c            Between     95% Confidence
                                     Comparison         Means         Limits

                                       1 - 2           0.4476     0.1786  0.7166  ***
                                       1 - 5           0.6208     0.3518  0.8898  ***
                                       1 - 4           0.7339     0.4649  1.0028  ***
                                       1 - 3           0.8549     0.5859  1.1239  ***
                                       2 - 1          -0.4476    -0.7166 -0.1786  ***
                                       2 - 5           0.1732    -0.0958  0.4422
                                       2 - 4           0.2863     0.0173  0.5553  ***
                                       2 - 3           0.4074     0.1384  0.6763  ***
                                       5 - 1          -0.6208    -0.8898 -0.3518  ***
                                       5 - 2          -0.1732    -0.4422  0.0958
                                       5 - 4           0.1131    -0.1559  0.3821
                                       5 - 3           0.2342    -0.0348  0.5031
                                       4 - 1          -0.7339    -1.0028 -0.4649  ***
                                       4 - 2          -0.2863    -0.5553 -0.0173  ***
                                       4 - 5          -0.1131    -0.3821  0.1559
                                       4 - 3           0.1211    -0.1479  0.3901
                                       3 - 1          -0.8549    -1.1239 -0.5859  ***
                                       3 - 2          -0.4074    -0.6763 -0.1384  ***
                                       3 - 5          -0.2342    -0.5031  0.0348
                                       3 - 4          -0.1211    -0.3901  0.1479



不用宏程序,则无法运算出上述结果,为什么?请问高手为什么?谢谢!!!











最佳答案

farmman60 查看完整内容

proc anova; class c; model x3=c; means c/cldiff t; run; or proc glm; class c; model x3=c; lsmeans c/cl pdiff; run;
关键词:200论坛币 方差分析 0论坛币 论坛币 significant 两两 论坛
即使在人大经济论坛这个网络世界,我仍以真诚为基础与我的好友进行交往!

沙发
farmman60 发表于 2013-5-7 18:33:57

proc anova;
class c;
model x3=c;
means c/cldiff t;
run;

or

proc glm;
class c;
model x3=c;
lsmeans c/cl  pdiff;
run;

藤椅
xu_junyi 在职认证  发表于 2013-5-7 18:37:23 来自手机
我也遇到了这样的问题!

板凳
yuerqieqie 发表于 2013-5-7 20:58:56
试着run了一下,不用宏也可以得到这样的结果啊

报纸
lnlhckao123 发表于 2013-5-7 23:58:11
谢谢farmman60!我运行您的程序,可以用!!
即使在人大经济论坛这个网络世界,我仍以真诚为基础与我的好友进行交往!

地板
lnlhckao123 发表于 2013-5-8 00:29:56
您好farmman60!请问,用glm程序时,出现两个结果,下面一个是可信区间,我看得懂;上面一个是用两个交叉的组别P值表示,其两个交叉组别所对应的P值意思是不是同可信区间所得的意义是一样的,只不过更具体的把P值写出来而已,是吗?期待您的答复!!
即使在人大经济论坛这个网络世界,我仍以真诚为基础与我的好友进行交往!

7
nkunku 发表于 2013-5-8 06:53:09
好贴,学习了

8
lnlhckao123 发表于 2013-5-9 01:12:07
您好nkunku!好久不见了!
即使在人大经济论坛这个网络世界,我仍以真诚为基础与我的好友进行交往!

9
farmman60 发表于 2013-5-9 22:04:01
If I am wrong, please correct me.

My understanding is  that 95% Confidence Limits for LSMean(i)-LSMean(j) in proc glm is that there are 95% confidence (not probability) of minus of group(i) population mean and group(j) population mean located on the rang. P value is probability of result you get or more extreme result if null hypothesis is true. In this case, if goup(i) mean=group(j) mean(H0), both groups are t distribution, test statistic (t) is calculated, then checked the t table ( which is got by theoretical t distribution)  and freedom of degree, p value is got, if 0.05 is set as significant level, and if p value is less then 0.05, the H0 is refused and H1 accepted. All conclusions are based on ideal model, but actually the research design, sample size, bias, ect. could affect the conclusions.     

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2025-12-9 08:47