统计211

标题: 多个独立样本两两比较的Nemenyi法检验的SPSS程序(7组与3组) [打印本页]

作者: linxiuquan001    时间: 2010-7-25 11:13
标题: 多个独立样本两两比较的Nemenyi法检验的SPSS程序(7组与3组)
程序一(7组):
  1. data list free/Hc r1 r2 r3 r4 r5 r6 r7 N n1 n2 n3 n4 n5 n6 n7.
  2. begin data
  3. * 请于此行输入Kruskal-Wallis H 检验的结果(即Hc r1 r2 r3 r4 r5 r6 r7 N n1 n2 n3 n4 n5 n6 n7,尽量精确)
  4. end data.

  5. compute H=(12*((r1*n1)**2/n1+(r2*n2)**2/n2+(r3*n3)**2/n3+(r4*n4)**2/n4+(r5*n5)**2/n5+(r6*n6)**2/n6+(r7*n7)**2/n7))/(N*(N+1))-3*(N+1).

  6. compute c=H/Hc.

  7. compute x12=(r1-r2)**2/((N*(N+1)/12)*(1/n1+1/n2)*c).
  8. compute x13=(r1-r3)**2/((N*(N+1)/12)*(1/n1+1/n3)*c).
  9. compute x14=(r1-r4)**2/((N*(N+1)/12)*(1/n1+1/n4)*c).
  10. compute x15=(r1-r5)**2/((N*(N+1)/12)*(1/n1+1/n5)*c).
  11. compute x16=(r1-r6)**2/((N*(N+1)/12)*(1/n1+1/n6)*c).
  12. compute x17=(r1-r7)**2/((N*(N+1)/12)*(1/n1+1/n7)*c).

  13. compute x23=(r2-r3)**2/((N*(N+1)/12)*(1/n2+1/n3)*c).
  14. compute x24=(r2-r4)**2/((N*(N+1)/12)*(1/n2+1/n4)*c).
  15. compute x25=(r2-r5)**2/((N*(N+1)/12)*(1/n2+1/n5)*c).
  16. compute x26=(r2-r6)**2/((N*(N+1)/12)*(1/n2+1/n6)*c).
  17. compute x27=(r2-r7)**2/((N*(N+1)/12)*(1/n2+1/n7)*c).

  18. compute x34=(r3-r4)**2/((N*(N+1)/12)*(1/n3+1/n4)*c).
  19. compute x35=(r3-r5)**2/((N*(N+1)/12)*(1/n3+1/n5)*c).
  20. compute x36=(r3-r6)**2/((N*(N+1)/12)*(1/n3+1/n6)*c).
  21. compute x37=(r3-r7)**2/((N*(N+1)/12)*(1/n3+1/n7)*c).

  22. compute x45=(r4-r5)**2/((N*(N+1)/12)*(1/n4+1/n5)*c).
  23. compute x46=(r4-r6)**2/((N*(N+1)/12)*(1/n4+1/n6)*c).
  24. compute x47=(r4-r7)**2/((N*(N+1)/12)*(1/n4+1/n7)*c).

  25. compute x56=(r5-r6)**2/((N*(N+1)/12)*(1/n5+1/n6)*c).
  26. compute x57=(r5-r7)**2/((N*(N+1)/12)*(1/n5+1/n7)*c).

  27. compute x67=(r6-r7)**2/((N*(N+1)/12)*(1/n6+1/n7)*c).

  28. compute p12=1-cdf.chisq(x12,6).
  29. compute p13=1-cdf.chisq(x13,6).
  30. compute p14=1-cdf.chisq(x14,6).
  31. compute p15=1-cdf.chisq(x15,6).
  32. compute p16=1-cdf.chisq(x16,6).
  33. compute p17=1-cdf.chisq(x17,6).

  34. compute p23=1-cdf.chisq(x23,6).
  35. compute p24=1-cdf.chisq(x24,6).
  36. compute p25=1-cdf.chisq(x25,6).
  37. compute p26=1-cdf.chisq(x26,6).
  38. compute p27=1-cdf.chisq(x27,6).

  39. compute p34=1-cdf.chisq(x34,6).
  40. compute p35=1-cdf.chisq(x35,6).
  41. compute p36=1-cdf.chisq(x36,6).
  42. compute p37=1-cdf.chisq(x37,6).

  43. compute p45=1-cdf.chisq(x45,6).
  44. compute p46=1-cdf.chisq(x46,6).
  45. compute p47=1-cdf.chisq(x47,6).

  46. compute p56=1-cdf.chisq(x56,6).
  47. compute p57=1-cdf.chisq(x57,6).

  48. compute p67=1-cdf.chisq(x67,6).

  49. execute.
复制代码
注:少于7组的,删掉相应的行与变量即可。
举例3组的如下:

程序二(3组):
  1. data list free/Hc r1 r2 r3 N n1 n2 n3.
  2. begin data
  3. * 请于此行输入Kruskal-Wallis H 检验的结果(即Hc r1 r2 r3 N n1 n2 n3,尽量精确)
  4. end data.

  5. compute H=(12*((r1*n1)**2/n1+(r2*n2)**2/n2+(r3*n3)**2/n3))/(N*(N+1))-3*(N+1).

  6. compute c=H/Hc.

  7. compute x12=(r1-r2)**2/((N*(N+1)/12)*(1/n1+1/n2)*c).
  8. compute x13=(r1-r3)**2/((N*(N+1)/12)*(1/n1+1/n3)*c).

  9. compute x23=(r2-r3)**2/((N*(N+1)/12)*(1/n2+1/n3)*c).

  10. compute p12=1-cdf.chisq(x12,2).
  11. compute p13=1-cdf.chisq(x13,2).

  12. compute p23=1-cdf.chisq(x23,2).

  13. execute.
复制代码
参考文献:

SPSS在完全随机设计多个样本间多重比较Nemenyi秩和检验中的应用.pdf

127.31 KB, 下载次数: 5379


作者: wwy    时间: 2010-8-18 23:15
领悟了!
真是高!
SPSS越接触越觉得妙不可言!
作者: lykyoung    时间: 2010-10-12 23:27
我的有十组,我改下程序去
作者: 275932488    时间: 2010-10-22 13:20
lykyoung 发表于 2010-10-12 23:27
我的有十组,我改下程序去

改完上传上来共享。{:1_168:}
作者: grace    时间: 2010-12-11 23:50
请教下高手啊,为什么我输入程序后,显示Error # 4135 in column 1.  Text: 10.415
>You must not specify the column location for variables read in FREE or LIST
>format.  是不是我第三条命令输的不对啊??
求各位高手指点下啊。。。。。。感激不尽!!!!!
作者: 275932488    时间: 2010-12-12 00:18
回复 grace 的帖子

可以把你的程序发过来看下吗?
作者: grace    时间: 2010-12-12 00:25
回复 275932488 的帖子

data list free/Hc r1 r2 r3 N n1 n2 n3
begin data
10.415 7.88 18.88 10.75 24 8 8 8
end data.
compute H=(12*((r1*n1)**2/n1+(r2*n2)**2/n2+(r3*n3)**2/n3))/(N*(N+1))-3*(N+1)
compute c=H/Hc.
compute x12=(r1-r2)**2/((N*(N+1)/12)*(1/n1+1/n2)*c).
compute x13=(r1-r3)**2/((N*(N+1)/12)*(1/n1+1/n3)*c).
compute x23=(r2-r3)**2/((N*(N+1)/12)*(1/n2+1/n3)*c).
compute p12=1-cdf.chisq(x12,2).
compute p13=1-cdf.chisq(x13,2).
compute p23=1-cdf.chisq(x23,2).
execute.

作者: 275932488    时间: 2010-12-12 17:50
回复 grace 的帖子

帮你修改了一下,可以了,如下:
data list free/Hc r1 r2 r3 N n1 n2 n3.
begin data
10.415 7.88 18.88 10.75 24 8 8 8
end data.
compute H=(12*((r1*n1)**2/n1+(r2*n2)**2/n2+(r3*n3)**2/n3))/(N*(N+1))-3*(N+1).
compute c=H/Hc.
compute x12=(r1-r2)**2/((N*(N+1)/12)*(1/n1+1/n2)*c).
compute x13=(r1-r3)**2/((N*(N+1)/12)*(1/n1+1/n3)*c).
compute x23=(r2-r3)**2/((N*(N+1)/12)*(1/n2+1/n3)*c).
compute p12=1-cdf.chisq(x12,2).
compute p13=1-cdf.chisq(x13,2).
compute p23=1-cdf.chisq(x23,2).
execute.
作者: 275932488    时间: 2010-12-12 18:11
回复 grace 的帖子

程序第1行与第5行各少了一个“.”,这个“.”是用来结束语句的,不能省略。
作者: grace    时间: 2010-12-12 20:43
回复 275932488 的帖子

真的可以了啊,非常感谢啊!!真厉害,不然我的论文都不知道怎么搞了,哎呀,谢谢谢谢!!
作者: 275932488    时间: 2010-12-12 21:03
回复 grace 的帖子

不客气{:1_165:}
作者: greenker    时间: 2010-12-13 20:48
受教 了。
作者: jack19850430    时间: 2011-1-2 00:26
请教下高手啊,为什么我输入程序后,显示为
Error # 4100 in column 20.  Text: rll
>Unrecognized text appears on the DATA LIST command in the file specification
>section. this test will be ignored
this command not executed
我怀疑是不是我的spss软件有问题啊,平时数据和结果就不能直接存储,只能放到word文档里面再存。还是我的程序错了.
我的程序如下:
data list free/Hc rl r2 r3 r4 r5 r6 N nl n2 n3 n4 n5 n6.
begin data
18.471 27.43 26.57 29.86 22.86 16.14 6.14 42 7 7 7 7 7 7
end data.
compute H=(12*((r1*n1)**2/n1+(r2*n2)**2/n2+(r3*n3)**2/n3+(r4*n4)**2/n4+(r5*n5)**2/n5+(r6*n6)**2/n6))/(N*(N+1))-3*(N+1).
compute c=H/Hc.
compute x12=(r1-r2)**2/((N*(N+1)/12)*(1/n1+1/n2)*c).
compute x13=(r1-r3)**2/((N*(N+1)/12)*(1/n1+1/n3)*c).
compute x14=(r1-r4)**2/((N*(N+1)/12)*(1/n1+1/n4)*c).
compute x15=(r1-r5)**2/((N*(N+1)/12)*(1/n1+1/n5)*c).
compute x16=(r1-r6)**2/((N*(N+1)/12)*(1/n1+1/n6)*c).
compute x23=(r2-r3)**2/((N*(N+1)/12)*(1/n2+1/n3)*c).
compute x24=(r2-r4)**2/((N*(N+1)/12)*(1/n2+1/n4)*c).
compute x25=(r2-r5)**2/((N*(N+1)/12)*(1/n2+1/n5)*c).
compute x26=(r2-r6)**2/((N*(N+1)/12)*(1/n2+1/n6)*c).
compute x34=(r3-r4)**2/((N*(N+1)/12)*(1/n3+1/n4)*c).
compute x35=(r3-r5)**2/((N*(N+1)/12)*(1/n3+1/n5)*c).
compute x36=(r3-r6)**2/((N*(N+1)/12)*(1/n3+1/n6)*c).
compute x45=(r4-r5)**2/((N*(N+1)/12)*(1/n4+1/n5)*c).
compute x46=(r4-r6)**2/((N*(N+1)/12)*(1/n4+1/n6)*c).
compute x56=(r5-r6)**2/((N*(N+1)/12)*(1/n5+1/n6)*c).
compute p12=1-cdf.chisq(x12,2).
compute p13=1-cdf.chisq(x13,2).
compute p14=1-cdf.chisq(x14,2).
compute p15=1-cdf.chisq(x15,2).
compute p16=1-cdf.chisq(x16,2).
compute p23=1-cdf.chisq(x23,2).
compute p24=1-cdf.chisq(x24,2).
compute p25=1-cdf.chisq(x25,2).
compute p26=1-cdf.chisq(x26,2).
compute p34=1-cdf.chisq(x34,2).
compute p35=1-cdf.chisq(x35,2).
compute p36=1-cdf.chisq(x36,2).
compute p45=1-cdf.chisq(x45,2).
compute p46=1-cdf.chisq(x46,2).
compute p56=1-cdf.chisq(x56,2).
execute.

求各位高手指点下啊。。。。。。感激不尽!!!!!
作者: linxiuquan001    时间: 2011-1-2 15:08
回复 jack19850430 的帖子

不是你的软件问题,是程序data list出错了,我帮你改了下,可以运行成功,直接复制即可,新程序如下:
data list free/Hc r1 r2 r3 r4 r5 r6 N n1 n2 n3 n4 n5 n6.
begin data
18.471 27.43 26.57 29.86 22.86 16.14 6.14 42 7 7 7 7 7 7
end data.
compute H=(12*((r1*n1)**2/n1+(r2*n2)**2/n2+(r3*n3)**2/n3+(r4*n4)**2/n4+(r5*n5)**2/n5+(r6*n6)**2/n6))/(N*(N+1))-3*(N+1).
compute c=H/Hc.
compute x12=(r1-r2)**2/((N*(N+1)/12)*(1/n1+1/n2)*c).
compute x13=(r1-r3)**2/((N*(N+1)/12)*(1/n1+1/n3)*c).
compute x14=(r1-r4)**2/((N*(N+1)/12)*(1/n1+1/n4)*c).
compute x15=(r1-r5)**2/((N*(N+1)/12)*(1/n1+1/n5)*c).
compute x16=(r1-r6)**2/((N*(N+1)/12)*(1/n1+1/n6)*c).
compute x23=(r2-r3)**2/((N*(N+1)/12)*(1/n2+1/n3)*c).
compute x24=(r2-r4)**2/((N*(N+1)/12)*(1/n2+1/n4)*c).
compute x25=(r2-r5)**2/((N*(N+1)/12)*(1/n2+1/n5)*c).
compute x26=(r2-r6)**2/((N*(N+1)/12)*(1/n2+1/n6)*c).
compute x34=(r3-r4)**2/((N*(N+1)/12)*(1/n3+1/n4)*c).
compute x35=(r3-r5)**2/((N*(N+1)/12)*(1/n3+1/n5)*c).
compute x36=(r3-r6)**2/((N*(N+1)/12)*(1/n3+1/n6)*c).
compute x45=(r4-r5)**2/((N*(N+1)/12)*(1/n4+1/n5)*c).
compute x46=(r4-r6)**2/((N*(N+1)/12)*(1/n4+1/n6)*c).
compute x56=(r5-r6)**2/((N*(N+1)/12)*(1/n5+1/n6)*c).
compute p12=1-cdf.chisq(x12,2).
compute p13=1-cdf.chisq(x13,2).
compute p14=1-cdf.chisq(x14,2).
compute p15=1-cdf.chisq(x15,2).
compute p16=1-cdf.chisq(x16,2).
compute p23=1-cdf.chisq(x23,2).
compute p24=1-cdf.chisq(x24,2).
compute p25=1-cdf.chisq(x25,2).
compute p26=1-cdf.chisq(x26,2).
compute p34=1-cdf.chisq(x34,2).
compute p35=1-cdf.chisq(x35,2).
compute p36=1-cdf.chisq(x36,2).
compute p45=1-cdf.chisq(x45,2).
compute p46=1-cdf.chisq(x46,2).
compute p56=1-cdf.chisq(x56,2).
execute.

作者: jack19850430    时间: 2011-1-3 00:42
回复 linxiuquan001 的帖子

谢谢大侠,叩谢啊。。。果然搞定了。。。{:1_179:}
作者: linxiuquan001    时间: 2011-1-3 11:21
回复 jack19850430 的帖子

并非大侠,一起交流{:1_176:}
作者: jack19850430    时间: 2011-1-4 00:20
回复 linxiuquan001 的帖子

我想问一下,是不是如果方差不齐,只能用秩和检验还是可以用SPSS里面的单因素方差分析的未假定方差齐性的检验方法?
我用单因素方差分析检验的结果是F=0.60,我正在犹豫用哪种比较合适?麻烦您解答一下啊?
作者: linxiuquan001    时间: 2011-1-4 12:45
回复 jack19850430 的帖子

常用秩和检验
作者: jack19850430    时间: 2011-1-4 21:15
回复 linxiuquan001 的帖子

好的,多谢。
作者: zf123456    时间: 2011-1-10 17:52
请教:为什么结果显示execute,而没有数据?
data list free/Hc r1 r2 r3 N n1 n2 n3
begin data
43.69 82.05 44.22 33.86 95 21 32 42
end data.
compute H=(12*((r1*n1)**2/n1+(r2*n2)**2/n2+(r3*n3)**2/n3))/(N*(N+1))-3*(N+1).
compute c=H/Hc.
compute x12=(r1-r2)**2/((N*(N+1)/12)*(1/n1+1/n2)*c).
compute x13=(r1-r3)**2/((N*(N+1)/12)*(1/n1+1/n3)*c).
compute x23=(r2-r3)**2/((N*(N+1)/12)*(1/n2+1/n3)*c).
compute p12=1-cdf.chisq(x12,2).
compute p13=1-cdf.chisq(x13,2).
compute p23=1-cdf.chisq(x23,2).
execute.
作者: linxiuquan001    时间: 2011-1-10 22:14
回复 zf123456 的帖子

程序第一行少了一个“.”
修改后如下:
data list free/Hc r1 r2 r3 N n1 n2 n3.
begin data
43.69 82.05 44.22 33.86 95 21 32 42
end data.
compute H=(12*((r1*n1)**2/n1+(r2*n2)**2/n2+(r3*n3)**2/n3))/(N*(N+1))-3*(N+1).
compute c=H/Hc.
compute x12=(r1-r2)**2/((N*(N+1)/12)*(1/n1+1/n2)*c).
compute x13=(r1-r3)**2/((N*(N+1)/12)*(1/n1+1/n3)*c).
compute x23=(r2-r3)**2/((N*(N+1)/12)*(1/n2+1/n3)*c).
compute p12=1-cdf.chisq(x12,2).
compute p13=1-cdf.chisq(x13,2).
compute p23=1-cdf.chisq(x23,2).
execute.
运行的结果生成在电子表格中。
作者: happywater    时间: 2011-1-18 13:58
你好,我用那个多个独立样本两两比较的Nemenyi法检验的SPSS程序,为什么没有结果显示呀,只在DATA EDITOR的窗口出现了我输入的第三行的数据呢,急求结果 ,感谢。
作者: linxiuquan001    时间: 2011-1-18 22:37
回复 happywater 的帖子

程序运行后的结果就是在“DATA EDITOR的窗口”,在你输入的第三行的数据右边。
作者: happywater    时间: 2011-1-19 12:52
可是在数字旁边没有结果呀

作者: 忘忧草01    时间: 2011-2-19 21:42
为什么我的做不了啊?是不是SPSS18.0没有这个功能?

DATASET ACTIVATE DataSet1.
data list free/Hc r1 r2 r3 N n1 n2 n3.
begin data
762.458 728.52 472.48 150.50 900 300 300
end data.

>Warning # 522
>Undefined error #522 - Cannot open text file "C:\Program Files\SPSSInc\PASWStatistics18\lang\en\spss.err": No such file or directory
>Command line: 50  Current case: 1  Current splitfile group: 1
compute H=(12*((r1*n1)**2/n1+(r2*n2)**2/n2+(r3*n3)**2/n3))/(N*(N+1))-3*(N+1).
compute c=H/Hc.
compute x12=(r1-r2)**2/((N*(N+1)/12)*(1/n1+1/n2)*c).
compute x13=(r1-r3)**2/((N*(N+1)/12)*(1/n1+1/n3)*c).
compute x23=(r2-r3)**2/((N*(N+1)/12)*(1/n2+1/n3)*c).
compute p12=1-cdf.chisq(x12,2).
compute p13=1-cdf.chisq(x13,2).
compute p23=1-cdf.chisq(x23,2).
execute.
作者: linxiuquan001    时间: 2011-2-20 11:38
回复 happywater 的帖子

那就是程序没有运行完,最后的“execute.”不要漏了。
作者: linxiuquan001    时间: 2011-2-20 11:48
回复 忘忧草01 的帖子

18.0有这个功能。是你的程序多了“DATASET ACTIVATE DataSet1. ”,还有n3忘了。
帮你修改了一下程序,可以了。如下:
data list free/Hc r1 r2 r3 N n1 n2 n3.
begin data
762.458 728.52 472.48 150.50 900 300 300 300
end data.
compute H=(12*((r1*n1)**2/n1+(r2*n2)**2/n2+(r3*n3)**2/n3))/(N*(N+1))-3*(N+1).
compute c=H/Hc.
compute x12=(r1-r2)**2/((N*(N+1)/12)*(1/n1+1/n2)*c).
compute x13=(r1-r3)**2/((N*(N+1)/12)*(1/n1+1/n3)*c).
compute x23=(r2-r3)**2/((N*(N+1)/12)*(1/n2+1/n3)*c).
compute p12=1-cdf.chisq(x12,2).
compute p13=1-cdf.chisq(x13,2).
compute p23=1-cdf.chisq(x23,2).
execute.
作者: 忘忧草01    时间: 2011-2-20 12:17
谢谢,真的行了!谢谢啦!!!
有机会,真想请你吃饭!
作者: linxiuquan001    时间: 2011-2-20 12:36
回复 忘忧草01 的帖子

不谢。
作者: su2005    时间: 2011-2-23 12:12
{:2_185:}
作者: chandler    时间: 2011-2-26 23:26
本帖最后由 chandler 于 2011-3-1 01:38 编辑

为什么我的结果做出来,卡方都是负数,而且每一个P值都等于1呢?原数据经Kruskal-Wallis H法秩和检验提示组间炎症活动度差异有显著性,P值小于0.001,卡方值等于77.767。H值是负的。。。
data list free/Hc r1 r2 r3 r4 r5 r6 r7 r8 N n1 n2 n3 n4 n5 n6 n7 n8.
begin data
77.767 166.95 254.9 251.2 265.43 274.85 230.12 134 134.86 415 102 42 35 50 13 101 4 68
end data.
compute H=(12*((r1*n1)**2/n1+(r2*n2)**2/n2+(r3*n3)**2/n3+(r4*n4)**2/n4+(r5*n5)**2/n5+(r6*n6)**2/n6+(r7*n7)**2/n7)+(r8*n8)**2/n8)/(N*(N+1))-3*(N+1).
compute c=H/Hc.
compute x12=(r1-r2)**2/((N*(N+1)/12)*(1/n1+1/n2)*c).
compute x13=(r1-r3)**2/((N*(N+1)/12)*(1/n1+1/n3)*c).
compute x14=(r1-r4)**2/((N*(N+1)/12)*(1/n1+1/n4)*c).
compute x15=(r1-r5)**2/((N*(N+1)/12)*(1/n1+1/n5)*c).
compute x16=(r1-r6)**2/((N*(N+1)/12)*(1/n1+1/n6)*c).
compute x17=(r1-r7)**2/((N*(N+1)/12)*(1/n1+1/n7)*c).
compute x18=(r1-r8)**2/((N*(N+1)/12)*(1/n1+1/n8)*c).
compute x23=(r2-r3)**2/((N*(N+1)/12)*(1/n2+1/n3)*c).
compute x24=(r2-r4)**2/((N*(N+1)/12)*(1/n2+1/n4)*c).
compute x25=(r2-r5)**2/((N*(N+1)/12)*(1/n2+1/n5)*c).
compute x26=(r2-r6)**2/((N*(N+1)/12)*(1/n2+1/n6)*c).
compute x27=(r2-r7)**2/((N*(N+1)/12)*(1/n2+1/n7)*c).
compute x28=(r2-r8)**2/((N*(N+1)/12)*(1/n2+1/n8)*c).
compute x34=(r3-r4)**2/((N*(N+1)/12)*(1/n3+1/n4)*c).
compute x35=(r3-r5)**2/((N*(N+1)/12)*(1/n3+1/n5)*c).
compute x36=(r3-r6)**2/((N*(N+1)/12)*(1/n3+1/n6)*c).
compute x37=(r3-r7)**2/((N*(N+1)/12)*(1/n3+1/n7)*c).
compute x38=(r3-r8)**2/((N*(N+1)/12)*(1/n3+1/n8)*c).
compute x45=(r4-r5)**2/((N*(N+1)/12)*(1/n4+1/n5)*c).
compute x46=(r4-r6)**2/((N*(N+1)/12)*(1/n4+1/n6)*c).
compute x47=(r4-r7)**2/((N*(N+1)/12)*(1/n4+1/n7)*c).
compute x48=(r4-r8)**2/((N*(N+1)/12)*(1/n4+1/n8)*c).
compute x56=(r5-r6)**2/((N*(N+1)/12)*(1/n5+1/n6)*c).
compute x57=(r5-r7)**2/((N*(N+1)/12)*(1/n5+1/n7)*c).
compute x58=(r5-r8)**2/((N*(N+1)/12)*(1/n5+1/n8)*c).
compute x67=(r6-r7)**2/((N*(N+1)/12)*(1/n6+1/n7)*c).
compute x68=(r6-r8)**2/((N*(N+1)/12)*(1/n6+1/n8)*c).
compute x78=(r7-r8)**2/((N*(N+1)/12)*(1/n7+1/n8)*c).
compute p12=1-cdf.chisq(x12,2).
compute p13=1-cdf.chisq(x13,2).
compute p14=1-cdf.chisq(x14,2).
compute p15=1-cdf.chisq(x15,2).
compute p16=1-cdf.chisq(x16,2).
compute p17=1-cdf.chisq(x17,2).
compute p18=1-cdf.chisq(x18,2).
compute p23=1-cdf.chisq(x23,2).
compute p24=1-cdf.chisq(x24,2).
compute p25=1-cdf.chisq(x25,2).
compute p26=1-cdf.chisq(x26,2).
compute p27=1-cdf.chisq(x27,2).
compute p28=1-cdf.chisq(x28,2).
compute p34=1-cdf.chisq(x34,2).
compute p35=1-cdf.chisq(x35,2).
compute p36=1-cdf.chisq(x36,2).
compute p37=1-cdf.chisq(x37,2).
compute p38=1-cdf.chisq(x38,2).
compute p45=1-cdf.chisq(x45,2).
compute p46=1-cdf.chisq(x46,2).
compute p47=1-cdf.chisq(x47,2).
compute p48=1-cdf.chisq(x48,2).
compute p56=1-cdf.chisq(x56,2).
compute p57=1-cdf.chisq(x57,2).
compute p58=1-cdf.chisq(x58,2).
compute p67=1-cdf.chisq(x67,2).
compute p68=1-cdf.chisq(x68,2).
compute p78=1-cdf.chisq(x78,2).
execute.
作者: tongji    时间: 2011-3-2 10:47
本帖最后由 tongji 于 2011-3-2 10:49 编辑

回复 chandler 的帖子

H值是负的??那Hc也是负的吗?
作者: ahfyhp    时间: 2011-3-6 15:33
我用的是SPSS13.0,运行之后只有输入的第三行数字,没有结果。并且出现下列提示:
>Error # 4285 in column 27.  Text: nl
>Undefined error #4285 - Cannot open text file "C:\Program Files\SPSS\en\windows\spss.err": No such file or directory
>This command not executed.


>Error # 4285 in column 11.  Text: H
>Undefined error #4285 - Cannot open text file "C:\Program Files\SPSS\en\windows\spss.err": No such file or directory
>This command not executed.


>Error # 4285 in column 50.  Text: c
>Undefined error #4285 - Cannot open text file "C:\Program Files\SPSS\en\windows\spss.err": No such file or directory
>This command not executed.


>Error # 4285 in column 50.  Text: c
>Undefined error #4285 - Cannot open text file "C:\Program Files\SPSS\en\windows\spss.err": No such file or directory
>This command not executed.


>Error # 4285 in column 50.  Text: c
>Undefined error #4285 - Cannot open text file "C:\Program Files\SPSS\en\windows\spss.err": No such file or directory
>This command not executed.


>Error # 4285 in column 50.  Text: c
>Undefined error #4285 - Cannot open text file "C:\Program Files\SPSS\en\windows\spss.err": No such file or directory
>This command not executed.


>Error # 4285 in column 50.  Text: c
>Undefined error #4285 - Cannot open text file "C:\Program Files\SPSS\en\windows\spss.err": No such file or directory
>This command not executed.

C




>Error # 4285 in column 50.  Text: c
>Undefined error #4285 - Cannot open text file "C:\Program Files\SPSS\en\windows\spss.err": No such file or directory
>This command not executed.


>Error # 4285 in column 25.  Text: x12
>Undefined error #4285 - Cannot open text file "C:\Program Files\SPSS\en\windows\spss.err": No such file or directory
>This command not executed.


>Error # 4285 in column 25.  Text: x13
>Undefined error #4285 - Cannot open text file "C:\Program Files\SPSS\en\windows\spss.err": No such file or directory
>This command not executed.


>Error # 4285 in column 25.  Text: x14
>Undefined error #4285 - Cannot open text file "C:\Program Files\SPSS\en\windows\spss.err": No such file or directory
>This command not executed.


>Error # 4285 in column 25.  Text: x23
>Undefined error #4285 - Cannot open text file "C:\Program Files\SPSS\en\windows\spss.err": No such file or directory
>This command not executed.


>Error # 4285 in column 25.  Text: x24
>Undefined error #4285 - Cannot open text file "C:\Program Files\SPSS\en\windows\spss.err": No such file or directory
>This command not executed.


>Error # 4285 in column 25.  Text: x34
>Undefined error #4285 - Cannot open text file "C:\Program Files\SPSS\en\windows\spss.err": No such file or directory
>This command not executed.
我的编程是:
data list free/Hc r1 r2 r3 r4 N n1 n2 n3 n4.
begin data
10.76 452.70 373.28 442.03 427.76 850 105 120 140 485
end data.
compute H=(12*((r1*n1)**2/nl+(r2*n2)**2/n2+(r3*n3)**2/n3+(r4*n4)**2/n4))/(N* (N+1))-3*(N+1).
compute c=H/Hc.
compute x12=(r1-r2)**2/((N*(N+1)/12)*(1/n1+1/n2)*c).
compute x13=(r1-r3)**2/((N*(N+1)/12)*(1/n1+1/n3)*c).
compute x14=(r1-r4)**2/((N*(N+1)/12)*(1/n1+1/n4)*c).
compute x23=(r2-r3)**2/((N*(N+1)/12)*(1/n2+1/n3)*c).
compute x24=(r2-r4)**2/((N*(N+1)/12)*(1/n2+1/n4)*c).
compute x34=(r3-r4)**2/((N*(N+1)/12)*(1/n3+1/n4)*c).
compute p12=1-cdf.chisq(x12,2).
compute p13=1-cdf.chisq(x13,2).
compute p14=1-cdf.chisq(x14,2).
compute p23=1-cdf.chisq(x23,2).
compute p24=1-cdf.chisq(x24,2).
compute p34=1-cdf.chisq(x34,2).
execute.
作者: ahfyhp    时间: 2011-3-6 15:34
恳请高手给解答!{:1_176:}
作者: 275932488    时间: 2011-3-7 09:23
本帖最后由 275932488 于 2011-3-7 09:35 编辑

回复 ahfyhp 的帖子

“compute H=(12*((r1*n1)**2/nl+(r2*n2)**2/n2+(r3*n3)**2/n3+(r4*n4)**2/n4))/(N* (N+1))-3*(N+1).”这条程序中的红色字体部分错了,改成n1。
帮你修改了下,可以了。程序如下:
data list free/Hc r1 r2 r3 r4 N n1 n2 n3 n4.
begin data
10.76 452.70 373.28 442.03 427.76 850 105 120 140 485
end data.

compute H=(12*((r1*n1)**2/n1+(r2*n2)**2/n2+(r3*n3)**2/n3+(r4*n4)**2/n4))/(N*(N+1))-3*(N+1).

compute c=H/Hc.

compute x12=(r1-r2)**2/((N*(N+1)/12)*(1/n1+1/n2)*c).
compute x13=(r1-r3)**2/((N*(N+1)/12)*(1/n1+1/n3)*c).
compute x14=(r1-r4)**2/((N*(N+1)/12)*(1/n1+1/n4)*c).

compute x23=(r2-r3)**2/((N*(N+1)/12)*(1/n2+1/n3)*c).
compute x24=(r2-r4)**2/((N*(N+1)/12)*(1/n2+1/n4)*c).

compute x34=(r3-r4)**2/((N*(N+1)/12)*(1/n3+1/n4)*c).

compute p12=1-cdf.chisq(x12,2).
compute p13=1-cdf.chisq(x13,2).
compute p14=1-cdf.chisq(x14,2).

compute p23=1-cdf.chisq(x23,2).
compute p24=1-cdf.chisq(x24,2).

compute p34=1-cdf.chisq(x34,2).

execute.
作者: ahfyhp    时间: 2011-3-7 20:49
谢谢谢谢~~你果然是个高手!{:1_168:}
作者: ahfyhp    时间: 2011-3-7 21:16
我想请教一个目前很纠结的问题:
我做的3个病例组和1个对照组的病例对照研究,需要看一个单核苷酸多态性对3个病例组的发病是否有影响,影响有多大。用多分类的Logistic回归分析得出的相关基因型的OR值比较大,4左右,并且OR值的可信区间也跨度很大,1~20,但是P值部室很小,0.03左右。这个结果有没有问题?用多分类的Logistic回归进行多组间的比较还需要进行Bonfferroni校正吗?
恳请高手能指点指点我。{:1_176:}
作者: ahfyhp    时间: 2011-3-7 21:39
请问这个Nemenyi法可以用于多个实验组与一个对照组之间的比较吗?
作者: 275932488    时间: 2011-3-8 08:54
回复 ahfyhp 的帖子

不是{:1_165:}
作者: 275932488    时间: 2011-3-8 09:07
本帖最后由 275932488 于 2011-3-8 09:17 编辑

回复 ahfyhp 的帖子

个人觉得可以。还可以参考以下链接:
http://gw.seu.edu.cn/%BF%CE%BC%F ... %A7/Tjwlkc04/J4.htm
作者: linxiuquan001    时间: 2011-6-15 23:28
程序三(10组):今天一同学的论文用到,本以为7组已经很多了。
  1. data list free/Hc r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 N n1 n2 n3 n4 n5 n6 n7 n8 n9 n10.
  2. begin data
  3. * 请于此行输入Kruskal-Wallis H 检验的结果(即Hc r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 N n1 n2 n3 n4 n5 n6 n7 n8 n9 n10,尽量精确)
  4. end data.

  5. compute H=(12*((r1*n1)**2/n1+(r2*n2)**2/n2+(r3*n3)**2/n3+(r4*n4)**2/n4+(r5*n5)**2/n5+(r6*n6)**2/n6+(r7*n7)**2/n7+(r8*n8)**2/n8+(r9*n9)**2/n9+(r10*n10)**2/n10))/(N*(N+1))-3*(N+1).

  6. compute c=H/Hc.

  7. compute x12=(r1-r2)**2/((N*(N+1)/12)*(1/n1+1/n2)*c).
  8. compute x13=(r1-r3)**2/((N*(N+1)/12)*(1/n1+1/n3)*c).
  9. compute x14=(r1-r4)**2/((N*(N+1)/12)*(1/n1+1/n4)*c).
  10. compute x15=(r1-r5)**2/((N*(N+1)/12)*(1/n1+1/n5)*c).
  11. compute x16=(r1-r6)**2/((N*(N+1)/12)*(1/n1+1/n6)*c).
  12. compute x17=(r1-r7)**2/((N*(N+1)/12)*(1/n1+1/n7)*c).
  13. compute x18=(r1-r8)**2/((N*(N+1)/12)*(1/n1+1/n8)*c).
  14. compute x19=(r1-r9)**2/((N*(N+1)/12)*(1/n1+1/n9)*c).
  15. compute x110=(r1-r10)**2/((N*(N+1)/12)*(1/n1+1/n10)*c).

  16. compute x23=(r2-r3)**2/((N*(N+1)/12)*(1/n2+1/n3)*c).
  17. compute x24=(r2-r4)**2/((N*(N+1)/12)*(1/n2+1/n4)*c).
  18. compute x25=(r2-r5)**2/((N*(N+1)/12)*(1/n2+1/n5)*c).
  19. compute x26=(r2-r6)**2/((N*(N+1)/12)*(1/n2+1/n6)*c).
  20. compute x27=(r2-r7)**2/((N*(N+1)/12)*(1/n2+1/n7)*c).
  21. compute x28=(r2-r8)**2/((N*(N+1)/12)*(1/n2+1/n8)*c).
  22. compute x29=(r2-r9)**2/((N*(N+1)/12)*(1/n2+1/n9)*c).
  23. compute x210=(r2-r10)**2/((N*(N+1)/12)*(1/n2+1/n10)*c).

  24. compute x34=(r3-r4)**2/((N*(N+1)/12)*(1/n3+1/n4)*c).
  25. compute x35=(r3-r5)**2/((N*(N+1)/12)*(1/n3+1/n5)*c).
  26. compute x36=(r3-r6)**2/((N*(N+1)/12)*(1/n3+1/n6)*c).
  27. compute x37=(r3-r7)**2/((N*(N+1)/12)*(1/n3+1/n7)*c).
  28. compute x38=(r3-r8)**2/((N*(N+1)/12)*(1/n3+1/n8)*c).
  29. compute x39=(r3-r9)**2/((N*(N+1)/12)*(1/n3+1/n9)*c).
  30. compute x310=(r3-r10)**2/((N*(N+1)/12)*(1/n3+1/n10)*c).

  31. compute x45=(r4-r5)**2/((N*(N+1)/12)*(1/n4+1/n5)*c).
  32. compute x46=(r4-r6)**2/((N*(N+1)/12)*(1/n4+1/n6)*c).
  33. compute x47=(r4-r7)**2/((N*(N+1)/12)*(1/n4+1/n7)*c).
  34. compute x48=(r4-r8)**2/((N*(N+1)/12)*(1/n4+1/n8)*c).
  35. compute x49=(r4-r9)**2/((N*(N+1)/12)*(1/n4+1/n9)*c).
  36. compute x410=(r4-r10)**2/((N*(N+1)/12)*(1/n4+1/n10)*c).


  37. compute x56=(r5-r6)**2/((N*(N+1)/12)*(1/n5+1/n6)*c).
  38. compute x57=(r5-r7)**2/((N*(N+1)/12)*(1/n5+1/n7)*c).
  39. compute x58=(r5-r8)**2/((N*(N+1)/12)*(1/n5+1/n8)*c).
  40. compute x59=(r5-r9)**2/((N*(N+1)/12)*(1/n5+1/n9)*c).
  41. compute x510=(r5-r10)**2/((N*(N+1)/12)*(1/n5+1/n10)*c).

  42. compute x67=(r6-r7)**2/((N*(N+1)/12)*(1/n6+1/n7)*c).
  43. compute x68=(r6-r8)**2/((N*(N+1)/12)*(1/n6+1/n8)*c).
  44. compute x69=(r6-r9)**2/((N*(N+1)/12)*(1/n6+1/n9)*c).
  45. compute x610=(r6-r10)**2/((N*(N+1)/12)*(1/n6+1/n10)*c).

  46. compute x78=(r7-r8)**2/((N*(N+1)/12)*(1/n7+1/n8)*c).
  47. compute x79=(r7-r9)**2/((N*(N+1)/12)*(1/n7+1/n9)*c).
  48. compute x710=(r7-r10)**2/((N*(N+1)/12)*(1/n7+1/n10)*c).

  49. compute x89=(r8-r9)**2/((N*(N+1)/12)*(1/n8+1/n9)*c).
  50. compute x810=(r8-r10)**2/((N*(N+1)/12)*(1/n8+1/n10)*c).

  51. compute x910=(r9-r10)**2/((N*(N+1)/12)*(1/n9+1/n10)*c).

  52. compute p12=1-cdf.chisq(x12,2).
  53. compute p13=1-cdf.chisq(x13,2).
  54. compute p14=1-cdf.chisq(x14,2).
  55. compute p15=1-cdf.chisq(x15,2).
  56. compute p16=1-cdf.chisq(x16,2).
  57. compute p17=1-cdf.chisq(x17,2).
  58. compute p18=1-cdf.chisq(x18,2).
  59. compute p19=1-cdf.chisq(x19,2).
  60. compute p110=1-cdf.chisq(x110,2).

  61. compute p23=1-cdf.chisq(x23,2).
  62. compute p24=1-cdf.chisq(x24,2).
  63. compute p25=1-cdf.chisq(x25,2).
  64. compute p26=1-cdf.chisq(x26,2).
  65. compute p27=1-cdf.chisq(x27,2).
  66. compute p28=1-cdf.chisq(x28,2).
  67. compute p29=1-cdf.chisq(x29,2).
  68. compute p210=1-cdf.chisq(x210,2).

  69. compute p34=1-cdf.chisq(x34,2).
  70. compute p35=1-cdf.chisq(x35,2).
  71. compute p36=1-cdf.chisq(x36,2).
  72. compute p37=1-cdf.chisq(x37,2).
  73. compute p38=1-cdf.chisq(x38,2).
  74. compute p39=1-cdf.chisq(x39,2).
  75. compute p310=1-cdf.chisq(x310,2).

  76. compute p45=1-cdf.chisq(x45,2).
  77. compute p46=1-cdf.chisq(x46,2).
  78. compute p47=1-cdf.chisq(x47,2).
  79. compute p48=1-cdf.chisq(x48,2).
  80. compute p49=1-cdf.chisq(x49,2).
  81. compute p410=1-cdf.chisq(x410,2).

  82. compute p56=1-cdf.chisq(x56,2).
  83. compute p57=1-cdf.chisq(x57,2).
  84. compute p58=1-cdf.chisq(x58,2).
  85. compute p59=1-cdf.chisq(x59,2).
  86. compute p510=1-cdf.chisq(x510,2).

  87. compute p67=1-cdf.chisq(x67,2).
  88. compute p68=1-cdf.chisq(x68,2).
  89. compute p69=1-cdf.chisq(x69,2).
  90. compute p610=1-cdf.chisq(x610,2).

  91. compute p78=1-cdf.chisq(x78,2).
  92. compute p79=1-cdf.chisq(x79,2).
  93. compute p710=1-cdf.chisq(x710,2).

  94. compute p89=1-cdf.chisq(x89,2).
  95. compute p810=1-cdf.chisq(x810,2).

  96. compute p910=1-cdf.chisq(x910,2).

  97. execute.
复制代码

作者: 老好人    时间: 2011-9-19 15:14
做了个12组的但是出现错误
begin data

>Error # 3221.  Command name: begin data
>BEGIN DATA appears where inline data are not expected.  Everything up to the
>next END DATA command will be skipped.
>This command not executed.
43.229 13.12 10.12 4.62 6.62 42.75 35.75 41.75 39.75 27.5 30.25 22.12 19.62 48 4 4 4 4 4 4 4 4 4 4 4 4
end data.
begin data

程序
data list free/Hc r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 N n1 n2 n3 n4 n5 n6 n7 n8 n9 n10 n11 n12.
begin data
43.229 13.12 10.12 4.62 6.62 42.75 35.75 41.75 39.75 27.5 30.25 22.12 19.62 48 4 4 4 4 4 4 4 4 4 4 4 4
end data.

compute H=(12*((r1*n1)**2/n1+(r2*n2)**2/n2+(r3*n3)**2/n3+(r4*n4)**2/n4+(r5*n5)**2/n5+(r6*n6)**2/n6+(r7*n7)**2/n7+(r8*n8)**2/n8+(r9*n9)**2/n9+(r10*n10)**2/n10+(r11*n11)**2/n11+(r12*n12)**2/n12))/(N*(N+1))-3*(N+1).

compute c=H/Hc.

compute x12=(r1-r2)**2/((N*(N+1)/12)*(1/n1+1/n2)*c).
compute x13=(r1-r3)**2/((N*(N+1)/12)*(1/n1+1/n3)*c).
compute x14=(r1-r4)**2/((N*(N+1)/12)*(1/n1+1/n4)*c).
compute x15=(r1-r5)**2/((N*(N+1)/12)*(1/n1+1/n5)*c).
compute x16=(r1-r6)**2/((N*(N+1)/12)*(1/n1+1/n6)*c).
compute x17=(r1-r7)**2/((N*(N+1)/12)*(1/n1+1/n7)*c).
compute x18=(r1-r8)**2/((N*(N+1)/12)*(1/n1+1/n8)*c).
compute x19=(r1-r9)**2/((N*(N+1)/12)*(1/n1+1/n9)*c).
compute x110=(r1-r10)**2/((N*(N+1)/12)*(1/n1+1/n10)*c).
compute x111=(r1-r11)**2/((N*(N+1)/12)*(1/n1+1/n11)*c).
compute x112=(r1-r12)**2/((N*(N+1)/12)*(1/n1+1/n12)*c).

compute x23=(r2-r3)**2/((N*(N+1)/12)*(1/n2+1/n3)*c).
compute x24=(r2-r4)**2/((N*(N+1)/12)*(1/n2+1/n4)*c).
compute x25=(r2-r5)**2/((N*(N+1)/12)*(1/n2+1/n5)*c).
compute x26=(r2-r6)**2/((N*(N+1)/12)*(1/n2+1/n6)*c).
compute x27=(r2-r7)**2/((N*(N+1)/12)*(1/n2+1/n7)*c).
compute x28=(r2-r8)**2/((N*(N+1)/12)*(1/n2+1/n8)*c).
compute x29=(r2-r9)**2/((N*(N+1)/12)*(1/n2+1/n9)*c).
compute x210=(r2-r10)**2/((N*(N+1)/12)*(1/n2+1/n10)*c).
compute x211=(r2-r11)**2/((N*(N+1)/12)*(1/n2+1/n11)*c).
compute x212=(r2-r12)**2/((N*(N+1)/12)*(1/n2+1/n12)*c).

compute x34=(r3-r4)**2/((N*(N+1)/12)*(1/n3+1/n4)*c).
compute x35=(r3-r5)**2/((N*(N+1)/12)*(1/n3+1/n5)*c).
compute x36=(r3-r6)**2/((N*(N+1)/12)*(1/n3+1/n6)*c).
compute x37=(r3-r7)**2/((N*(N+1)/12)*(1/n3+1/n7)*c).
compute x38=(r3-r8)**2/((N*(N+1)/12)*(1/n3+1/n8)*c).
compute x39=(r3-r9)**2/((N*(N+1)/12)*(1/n3+1/n9)*c).
compute x310=(r3-r10)**2/((N*(N+1)/12)*(1/n3+1/n10)*c).
compute x311=(r3-r11)**2/((N*(N+1)/12)*(1/n3+1/n11)*c).
compute x312=(r3-r12)**2/((N*(N+1)/12)*(1/n3+1/n12)*c).

compute x45=(r4-r5)**2/((N*(N+1)/12)*(1/n4+1/n5)*c).
compute x46=(r4-r6)**2/((N*(N+1)/12)*(1/n4+1/n6)*c).
compute x47=(r4-r7)**2/((N*(N+1)/12)*(1/n4+1/n7)*c).
compute x48=(r4-r8)**2/((N*(N+1)/12)*(1/n4+1/n8)*c).
compute x49=(r4-r9)**2/((N*(N+1)/12)*(1/n4+1/n9)*c).
compute x410=(r4-r10)**2/((N*(N+1)/12)*(1/n4+1/n10)*c).
compute x411=(r4-r11)**2/((N*(N+1)/12)*(1/n4+1/n11)*c).
compute x412=(r4-r12)**2/((N*(N+1)/12)*(1/n4+1/n12)*c).

compute x56=(r5-r6)**2/((N*(N+1)/12)*(1/n5+1/n6)*c).
compute x57=(r5-r7)**2/((N*(N+1)/12)*(1/n5+1/n7)*c).
compute x58=(r5-r8)**2/((N*(N+1)/12)*(1/n5+1/n8)*c).
compute x59=(r5-r9)**2/((N*(N+1)/12)*(1/n5+1/n9)*c).
compute x510=(r5-r10)**2/((N*(N+1)/12)*(1/n5+1/n10)*c).
compute x511=(r5-r11)**2/((N*(N+1)/12)*(1/n5+1/n11)*c).
compute x512=(r5-r12)**2/((N*(N+1)/12)*(1/n5+1/n12)*c).

compute x67=(r6-r7)**2/((N*(N+1)/12)*(1/n6+1/n7)*c).
compute x68=(r6-r8)**2/((N*(N+1)/12)*(1/n6+1/n8)*c).
compute x69=(r6-r9)**2/((N*(N+1)/12)*(1/n6+1/n9)*c).
compute x610=(r6-r10)**2/((N*(N+1)/12)*(1/n6+1/n10)*c).
compute x611=(r6-r11)**2/((N*(N+1)/12)*(1/n6+1/n11)*c).
compute x612=(r6-r12)**2/((N*(N+1)/12)*(1/n6+1/n12)*c).


compute x78=(r7-r8)**2/((N*(N+1)/12)*(1/n7+1/n8)*c).
compute x79=(r7-r9)**2/((N*(N+1)/12)*(1/n7+1/n9)*c).
compute x710=(r7-r10)**2/((N*(N+1)/12)*(1/n7+1/n10)*c).
compute x711=(r7-r11)**2/((N*(N+1)/12)*(1/n7+1/n11)*c).
compute x712=(r7-r12)**2/((N*(N+1)/12)*(1/n7+1/n12)*c).

compute x89=(r8-r9)**2/((N*(N+1)/12)*(1/n8+1/n9)*c).
compute x810=(r8-r10)**2/((N*(N+1)/12)*(1/n8+1/n10)*c).
compute x811=(r8-r11)**2/((N*(N+1)/12)*(1/n8+1/n11)*c).
compute x812=(r8-r12)**2/((N*(N+1)/12)*(1/n8+1/n12)*c).

compute x910=(r9-r10)**2/((N*(N+1)/12)*(1/n9+1/n10)*c).
compute x911=(r9-r11)**2/((N*(N+1)/12)*(1/n9+1/n11)*c).
compute x912=(r9-r12)**2/((N*(N+1)/12)*(1/n9+1/n12)*c).

compute x1011=(r10-r11)**2/((N*(N+1)/12)*(1/n10+1/n11)*c).
compute x1012=(r10-r12)**2/((N*(N+1)/12)*(1/n10+1/n12)*c).

compute x1112=(r11-r12)**2/((N*(N+1)/12)*(1/n11+1/n12)*c).

compute p12=1-cdf.chisq(x12,2).
compute p13=1-cdf.chisq(x13,2).
compute p14=1-cdf.chisq(x14,2).
compute p15=1-cdf.chisq(x15,2).
compute p16=1-cdf.chisq(x16,2).
compute p17=1-cdf.chisq(x17,2).
compute p18=1-cdf.chisq(x18,2).
compute p19=1-cdf.chisq(x19,2).
compute p110=1-cdf.chisq(x110,2).
compute p111=1-cdf.chisq(x111,2).
compute p112=1-cdf.chisq(x112,2).

compute p23=1-cdf.chisq(x23,2).
compute p24=1-cdf.chisq(x24,2).
compute p25=1-cdf.chisq(x25,2).
compute p26=1-cdf.chisq(x26,2).
compute p27=1-cdf.chisq(x27,2).
compute p28=1-cdf.chisq(x28,2).
compute p29=1-cdf.chisq(x29,2).
compute p210=1-cdf.chisq(x210,2).
compute p211=1-cdf.chisq(x211,2).
compute p212=1-cdf.chisq(x212,2).

compute p34=1-cdf.chisq(x34,2).
compute p35=1-cdf.chisq(x35,2).
compute p36=1-cdf.chisq(x36,2).
compute p37=1-cdf.chisq(x37,2).
compute p38=1-cdf.chisq(x38,2).
compute p39=1-cdf.chisq(x39,2).
compute p310=1-cdf.chisq(x310,2).
compute p311=1-cdf.chisq(x311,2).
compute p312=1-cdf.chisq(x312,2).

compute p45=1-cdf.chisq(x45,2).
compute p46=1-cdf.chisq(x46,2).
compute p47=1-cdf.chisq(x47,2).
compute p48=1-cdf.chisq(x48,2).
compute p49=1-cdf.chisq(x49,2).
compute p410=1-cdf.chisq(x410,2).
compute p411=1-cdf.chisq(x411,2).
compute p412=1-cdf.chisq(x412,2).

compute p56=1-cdf.chisq(x56,2).
compute p57=1-cdf.chisq(x57,2).
compute p58=1-cdf.chisq(x58,2).
compute p59=1-cdf.chisq(x59,2).
compute p510=1-cdf.chisq(x510,2).
compute p511=1-cdf.chisq(x511,2).
compute p512=1-cdf.chisq(x512,2).

compute p67=1-cdf.chisq(x67,2).
compute p68=1-cdf.chisq(x68,2).
compute p69=1-cdf.chisq(x69,2).
compute p610=1-cdf.chisq(x610,2).
compute p611=1-cdf.chisq(x611,2).
compute p612=1-cdf.chisq(x612,2).

compute p78=1-cdf.chisq(x78,2).
compute p79=1-cdf.chisq(x79,2).
compute p710=1-cdf.chisq(x710,2).
compute p711=1-cdf.chisq(x711,2).
compute p712=1-cdf.chisq(x712,2).

compute p89=1-cdf.chisq(x89,2).
compute p810=1-cdf.chisq(x810,2).
compute p811=1-cdf.chisq(x811,2).
compute p812=1-cdf.chisq(x812,2).

compute p910=1-cdf.chisq(x910,2).
compute p911=1-cdf.chisq(x911,2).
compute p912=1-cdf.chisq(x912,2).

compute p1011=1-cdf.chisq(x1011,2).
compute p1012=1-cdf.chisq(x1012,2).

compute p1112=1-cdf.chisq(x1112,2).

execute.

求指正

作者: 275932488    时间: 2011-9-20 13:09
老好人 发表于 2011-9-19 15:14
做了个12组的但是出现错误
begin data
  1. data list free/Hc r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 N n1 n2 n3 n4 n5 n6 n7 n8 n9 n10 n11 n12.
  2. begin data
  3. 43.229 13.12 10.12 4.62 6.62 42.75 35.75 41.75 39.75 27.5 30.25 22.12 19.62 48 4 4 4 4 4 4 4 4 4 4 4 4
  4. end data.

  5. compute H=(12*((r1*n1)**2/n1+(r2*n2)**2/n2+(r3*n3)**2/n3+(r4*n4)**2/n4+(r5*n5)**2/n5+(r6*n6)**2/n6+(r7*n7)**2/n7+(r8*n8)**2/n8+(r9*n9)**2/n9+(r10*n10)**2/n10+(r11*n11)**2/n11+(r12*n12)**2/n12))/(N*(N+1))-3*(N+1).

  6. compute c=H/Hc.

  7. compute x12=(r1-r2)**2/((N*(N+1)/12)*(1/n1+1/n2)*c).
  8. compute x13=(r1-r3)**2/((N*(N+1)/12)*(1/n1+1/n3)*c).
  9. compute x14=(r1-r4)**2/((N*(N+1)/12)*(1/n1+1/n4)*c).
  10. compute x15=(r1-r5)**2/((N*(N+1)/12)*(1/n1+1/n5)*c).
  11. compute x16=(r1-r6)**2/((N*(N+1)/12)*(1/n1+1/n6)*c).
  12. compute x17=(r1-r7)**2/((N*(N+1)/12)*(1/n1+1/n7)*c).
  13. compute x18=(r1-r8)**2/((N*(N+1)/12)*(1/n1+1/n8)*c).
  14. compute x19=(r1-r9)**2/((N*(N+1)/12)*(1/n1+1/n9)*c).
  15. compute x110=(r1-r10)**2/((N*(N+1)/12)*(1/n1+1/n10)*c).
  16. compute x111=(r1-r11)**2/((N*(N+1)/12)*(1/n1+1/n11)*c).
  17. compute x112=(r1-r12)**2/((N*(N+1)/12)*(1/n1+1/n12)*c).

  18. compute x23=(r2-r3)**2/((N*(N+1)/12)*(1/n2+1/n3)*c).
  19. compute x24=(r2-r4)**2/((N*(N+1)/12)*(1/n2+1/n4)*c).
  20. compute x25=(r2-r5)**2/((N*(N+1)/12)*(1/n2+1/n5)*c).
  21. compute x26=(r2-r6)**2/((N*(N+1)/12)*(1/n2+1/n6)*c).
  22. compute x27=(r2-r7)**2/((N*(N+1)/12)*(1/n2+1/n7)*c).
  23. compute x28=(r2-r8)**2/((N*(N+1)/12)*(1/n2+1/n8)*c).
  24. compute x29=(r2-r9)**2/((N*(N+1)/12)*(1/n2+1/n9)*c).
  25. compute x210=(r2-r10)**2/((N*(N+1)/12)*(1/n2+1/n10)*c).
  26. compute x211=(r2-r11)**2/((N*(N+1)/12)*(1/n2+1/n11)*c).
  27. compute x212=(r2-r12)**2/((N*(N+1)/12)*(1/n2+1/n12)*c).

  28. compute x34=(r3-r4)**2/((N*(N+1)/12)*(1/n3+1/n4)*c).
  29. compute x35=(r3-r5)**2/((N*(N+1)/12)*(1/n3+1/n5)*c).
  30. compute x36=(r3-r6)**2/((N*(N+1)/12)*(1/n3+1/n6)*c).
  31. compute x37=(r3-r7)**2/((N*(N+1)/12)*(1/n3+1/n7)*c).
  32. compute x38=(r3-r8)**2/((N*(N+1)/12)*(1/n3+1/n8)*c).
  33. compute x39=(r3-r9)**2/((N*(N+1)/12)*(1/n3+1/n9)*c).
  34. compute x310=(r3-r10)**2/((N*(N+1)/12)*(1/n3+1/n10)*c).
  35. compute x311=(r3-r11)**2/((N*(N+1)/12)*(1/n3+1/n11)*c).
  36. compute x312=(r3-r12)**2/((N*(N+1)/12)*(1/n3+1/n12)*c).

  37. compute x45=(r4-r5)**2/((N*(N+1)/12)*(1/n4+1/n5)*c).
  38. compute x46=(r4-r6)**2/((N*(N+1)/12)*(1/n4+1/n6)*c).
  39. compute x47=(r4-r7)**2/((N*(N+1)/12)*(1/n4+1/n7)*c).
  40. compute x48=(r4-r8)**2/((N*(N+1)/12)*(1/n4+1/n8)*c).
  41. compute x49=(r4-r9)**2/((N*(N+1)/12)*(1/n4+1/n9)*c).
  42. compute x410=(r4-r10)**2/((N*(N+1)/12)*(1/n4+1/n10)*c).
  43. compute x411=(r4-r11)**2/((N*(N+1)/12)*(1/n4+1/n11)*c).
  44. compute x412=(r4-r12)**2/((N*(N+1)/12)*(1/n4+1/n12)*c).

  45. compute x56=(r5-r6)**2/((N*(N+1)/12)*(1/n5+1/n6)*c).
  46. compute x57=(r5-r7)**2/((N*(N+1)/12)*(1/n5+1/n7)*c).
  47. compute x58=(r5-r8)**2/((N*(N+1)/12)*(1/n5+1/n8)*c).
  48. compute x59=(r5-r9)**2/((N*(N+1)/12)*(1/n5+1/n9)*c).
  49. compute x510=(r5-r10)**2/((N*(N+1)/12)*(1/n5+1/n10)*c).
  50. compute x511=(r5-r11)**2/((N*(N+1)/12)*(1/n5+1/n11)*c).
  51. compute x512=(r5-r12)**2/((N*(N+1)/12)*(1/n5+1/n12)*c).

  52. compute x67=(r6-r7)**2/((N*(N+1)/12)*(1/n6+1/n7)*c).
  53. compute x68=(r6-r8)**2/((N*(N+1)/12)*(1/n6+1/n8)*c).
  54. compute x69=(r6-r9)**2/((N*(N+1)/12)*(1/n6+1/n9)*c).
  55. compute x610=(r6-r10)**2/((N*(N+1)/12)*(1/n6+1/n10)*c).
  56. compute x611=(r6-r11)**2/((N*(N+1)/12)*(1/n6+1/n11)*c).
  57. compute x612=(r6-r12)**2/((N*(N+1)/12)*(1/n6+1/n12)*c).


  58. compute x78=(r7-r8)**2/((N*(N+1)/12)*(1/n7+1/n8)*c).
  59. compute x79=(r7-r9)**2/((N*(N+1)/12)*(1/n7+1/n9)*c).
  60. compute x710=(r7-r10)**2/((N*(N+1)/12)*(1/n7+1/n10)*c).
  61. compute x711=(r7-r11)**2/((N*(N+1)/12)*(1/n7+1/n11)*c).
  62. compute x712=(r7-r12)**2/((N*(N+1)/12)*(1/n7+1/n12)*c).

  63. compute x89=(r8-r9)**2/((N*(N+1)/12)*(1/n8+1/n9)*c).
  64. compute x810=(r8-r10)**2/((N*(N+1)/12)*(1/n8+1/n10)*c).
  65. compute x811=(r8-r11)**2/((N*(N+1)/12)*(1/n8+1/n11)*c).
  66. compute x812=(r8-r12)**2/((N*(N+1)/12)*(1/n8+1/n12)*c).

  67. compute x910=(r9-r10)**2/((N*(N+1)/12)*(1/n9+1/n10)*c).
  68. compute x911=(r9-r11)**2/((N*(N+1)/12)*(1/n9+1/n11)*c).
  69. compute x912=(r9-r12)**2/((N*(N+1)/12)*(1/n9+1/n12)*c).

  70. compute x1011=(r10-r11)**2/((N*(N+1)/12)*(1/n10+1/n11)*c).
  71. compute x1012=(r10-r12)**2/((N*(N+1)/12)*(1/n10+1/n12)*c).

  72. compute x1112=(r11-r12)**2/((N*(N+1)/12)*(1/n11+1/n12)*c).

  73. compute p12=1-cdf.chisq(x12,2).
  74. compute p13=1-cdf.chisq(x13,2).
  75. compute p14=1-cdf.chisq(x14,2).
  76. compute p15=1-cdf.chisq(x15,2).
  77. compute p16=1-cdf.chisq(x16,2).
  78. compute p17=1-cdf.chisq(x17,2).
  79. compute p18=1-cdf.chisq(x18,2).
  80. compute p19=1-cdf.chisq(x19,2).
  81. compute p110=1-cdf.chisq(x110,2).
  82. compute p111=1-cdf.chisq(x111,2).
  83. compute p112=1-cdf.chisq(x112,2).

  84. compute p23=1-cdf.chisq(x23,2).
  85. compute p24=1-cdf.chisq(x24,2).
  86. compute p25=1-cdf.chisq(x25,2).
  87. compute p26=1-cdf.chisq(x26,2).
  88. compute p27=1-cdf.chisq(x27,2).
  89. compute p28=1-cdf.chisq(x28,2).
  90. compute p29=1-cdf.chisq(x29,2).
  91. compute p210=1-cdf.chisq(x210,2).
  92. compute p211=1-cdf.chisq(x211,2).
  93. compute p212=1-cdf.chisq(x212,2).

  94. compute p34=1-cdf.chisq(x34,2).
  95. compute p35=1-cdf.chisq(x35,2).
  96. compute p36=1-cdf.chisq(x36,2).
  97. compute p37=1-cdf.chisq(x37,2).
  98. compute p38=1-cdf.chisq(x38,2).
  99. compute p39=1-cdf.chisq(x39,2).
  100. compute p310=1-cdf.chisq(x310,2).
  101. compute p311=1-cdf.chisq(x311,2).
  102. compute p312=1-cdf.chisq(x312,2).

  103. compute p45=1-cdf.chisq(x45,2).
  104. compute p46=1-cdf.chisq(x46,2).
  105. compute p47=1-cdf.chisq(x47,2).
  106. compute p48=1-cdf.chisq(x48,2).
  107. compute p49=1-cdf.chisq(x49,2).
  108. compute p410=1-cdf.chisq(x410,2).
  109. compute p411=1-cdf.chisq(x411,2).
  110. compute p412=1-cdf.chisq(x412,2).

  111. compute p56=1-cdf.chisq(x56,2).
  112. compute p57=1-cdf.chisq(x57,2).
  113. compute p58=1-cdf.chisq(x58,2).
  114. compute p59=1-cdf.chisq(x59,2).
  115. compute p510=1-cdf.chisq(x510,2).
  116. compute p511=1-cdf.chisq(x511,2).
  117. compute p512=1-cdf.chisq(x512,2).

  118. compute p67=1-cdf.chisq(x67,2).
  119. compute p68=1-cdf.chisq(x68,2).
  120. compute p69=1-cdf.chisq(x69,2).
  121. compute p610=1-cdf.chisq(x610,2).
  122. compute p611=1-cdf.chisq(x611,2).
  123. compute p612=1-cdf.chisq(x612,2).

  124. compute p78=1-cdf.chisq(x78,2).
  125. compute p79=1-cdf.chisq(x79,2).
  126. compute p710=1-cdf.chisq(x710,2).
  127. compute p711=1-cdf.chisq(x711,2).
  128. compute p712=1-cdf.chisq(x712,2).

  129. compute p89=1-cdf.chisq(x89,2).
  130. compute p810=1-cdf.chisq(x810,2).
  131. compute p811=1-cdf.chisq(x811,2).
  132. compute p812=1-cdf.chisq(x812,2).

  133. compute p910=1-cdf.chisq(x910,2).
  134. compute p911=1-cdf.chisq(x911,2).
  135. compute p912=1-cdf.chisq(x912,2).

  136. compute p1011=1-cdf.chisq(x1011,2).
  137. compute p1012=1-cdf.chisq(x1012,2).

  138. compute p1112=1-cdf.chisq(x1112,2).

  139. execute.

复制代码
可以运行,没问题啊,结果见附件“分析结果”:
点击进入下载-分析结果.sav

作者: riskeen    时间: 2011-11-26 11:07
为什么我的程序提示:
>Warning # 522
>Undefined error #522 - Cannot open text file "D:\spss\en\windows\spss.err": No such file or directory

>Command line: 485  Current case: 1  Current splitfile group: 1

data list free/Hc r1 r2 r3 r4 r5 r6 r7 r8 r9 N n1 n2 n3 n4 n5 n6 n7 n8 n9.
begin data
26.646 40.69 15.88 45.88 41.63 11.88 40.69 32.38 31.00 39.81 72 8 8 8 8 8 8 8 8
end data.
compute H=(12*((r1*n1)**2/n1+(r2*n2)**2/n2+(r3*n3)**2/n3+(r4*n4)**2/n4+(r5*n5)**2/n5+(r6*n6)**2/n6+(r7*n7)**2/n7+(r8*n8)**2/n8+(r9*n9)**2/n9))/(N*(N+1))-3*(N+1).
compute C=H/Hc.
compute x12=(r1-r2)**2/((N*(N+1)/12)*(1/n1+1/n2)*c).
compute x13=(r1-r3)**2/((N*(N+1)/12)*(1/n1+1/n3)*c).
compute x14=(r1-r4)**2/((N*(N+1)/12)*(1/n1+1/n4)*c).
compute x15=(r1-r5)**2/((N*(N+1)/12)*(1/n1+1/n5)*c).
compute x16=(r1-r6)**2/((N*(N+1)/12)*(1/n1+1/n6)*c).
compute x17=(r1-r7)**2/((N*(N+1)/12)*(1/n1+1/n7)*c).
compute x18=(r1-r8)**2/((N*(N+1)/12)*(1/n1+1/n8)*c).
compute x19=(r1-r9)**2/((N*(N+1)/12)*(1/n1+1/n9)*c).
compute x23=(r2-r3)**2/((N*(N+1)/12)*(1/n2+1/n3)*c).
compute x24=(r2-r4)**2/((N*(N+1)/12)*(1/n2+1/n4)*c).
compute x25=(r2-r5)**2/((N*(N+1)/12)*(1/n2+1/n5)*c).
compute x26=(r2-r6)**2/((N*(N+1)/12)*(1/n2+1/n6)*c).
compute x27=(r2-r7)**2/((N*(N+1)/12)*(1/n2+1/n7)*c).
compute x28=(r2-r8)**2/((N*(N+1)/12)*(1/n2+1/n8)*c).
compute x29=(r2-r9)**2/((N*(N+1)/12)*(1/n2+1/n9)*c).
compute x34=(r3-r4)**2/((N*(N+1)/12)*(1/n3+1/n4)*c).
compute x35=(r3-r5)**2/((N*(N+1)/12)*(1/n3+1/n5)*c).
compute x36=(r3-r6)**2/((N*(N+1)/12)*(1/n3+1/n6)*c).
compute x37=(r3-r7)**2/((N*(N+1)/12)*(1/n3+1/n7)*c).
compute x38=(r3-r8)**2/((N*(N+1)/12)*(1/n3+1/n8)*c).
compute x39=(r3-r9)**2/((N*(N+1)/12)*(1/n3+1/n9)*c).
compute x45=(r4-r5)**2/((N*(N+1)/12)*(1/n4+1/n5)*c).
compute x46=(r4-r6)**2/((N*(N+1)/12)*(1/n4+1/n6)*c).
compute x47=(r4-r7)**2/((N*(N+1)/12)*(1/n4+1/n7)*c).
compute x48=(r4-r8)**2/((N*(N+1)/12)*(1/n4+1/n8)*c).
compute x49=(r4-r9)**2/((N*(N+1)/12)*(1/n4+1/n9)*c).
compute x56=(r5-r6)**2/((N*(N+1)/12)*(1/n5+1/n6)*c).
compute x57=(r5-r7)**2/((N*(N+1)/12)*(1/n5+1/n7)*c).
compute x58=(r5-r8)**2/((N*(N+1)/12)*(1/n5+1/n8)*c).
compute x59=(r5-r9)**2/((N*(N+1)/12)*(1/n5+1/n9)*c).
compute x67=(r6-r7)**2/((N*(N+1)/12)*(1/n6+1/n7)*c).
compute x68=(r6-r8)**2/((N*(N+1)/12)*(1/n6+1/n8)*c).
compute x69=(r6-r9)**2/((N*(N+1)/12)*(1/n6+1/n8)*c).
compute x78=(r7-r8)**2/((N*(N+1)/12)*(1/n7+1/n8)*c).
compute x79=(r7-r9)**2/((N*(N+1)/12)*(1/n7+1/n9)*c).
compute x89=(r8-r9)**2/((N*(N+1)/12)*(1/n8+1/n9)*c).
compute p12=1-cdf.chisq(x12,2).
compute p13=1-cdf.chisq(x13,2).
compute p14=1-cdf.chisq(x14,2).
compute p15=1-cdf.chisq(x15,2).
compute p16=1-cdf.chisq(x16,2).
compute p17=1-cdf.chisq(x17,2).
compute p18=1-cdf.chisq(x18,2).
compute p19=1-cdf.chisq(x19,2).
compute p23=1-cdf.chisq(x23,2).
compute p24=1-cdf.chisq(x24,2).
compute p25=1-cdf.chisq(x25,2).
compute p26=1-cdf.chisq(x26,2).
compute p27=1-cdf.chisq(x27,2).
compute p28=1-cdf.chisq(x28,2).
compute p29=1-cdf.chisq(x29,2).
compute p34=1-cdf.chisq(x34,2).
compute p35=1-cdf.chisq(x35,2).
compute p36=1-cdf.chisq(x36,2).
compute p37=1-cdf.chisq(x37,2).
compute p38=1-cdf.chisq(x38,2).
compute p39=1-cdf.chisq(x39,2).
compute p45=1-cdf.chisq(x45,2).
compute p46=1-cdf.chisq(x46,2).
compute p47=1-cdf.chisq(x47,2).
compute p48=1-cdf.chisq(x48,2).
compute p49=1-cdf.chisq(x49,2).
compute p56=1-cdf.chisq(x56,2).
compute p57=1-cdf.chisq(x57,2).
compute p58=1-cdf.chisq(x58,2).
compute p59=1-cdf.chisq(x59,2).
compute p67=1-cdf.chisq(x67,2).
compute p68=1-cdf.chisq(x68,2).
compute p69=1-cdf.chisq(x69,2).
compute p78=1-cdf.chisq(x78,2).
compute p79=1-cdf.chisq(x79,2).
compute p89=1-cdf.chisq(x89,2).
execute.
求指教
作者: chengxiaomai    时间: 2011-11-28 00:06
data list free/Hc r1 r2 r3 r4  N n1 n2 n3 n4 .
begin data
41.89 27.06 33.50 26.23 64 22 16 6 20
end data.

compute H=(12*((r1*n1)**2/n1+(r2*n2)**2/n2+(r3*n3)**2/n3+(r4*n4)**2/n4))/(N*(N+1))-3*(N+1).

compute c=H/Hc.

compute x12=(r1-r2)**2/((N*(N+1)/12)*(1/n1+1/n2)*c).
compute x13=(r1-r3)**2/((N*(N+1)/12)*(1/n1+1/n3)*c).
compute x14=(r1-r4)**2/((N*(N+1)/12)*(1/n1+1/n4)*c).

compute x23=(r2-r3)**2/((N*(N+1)/12)*(1/n2+1/n3)*c).
compute x24=(r2-r4)**2/((N*(N+1)/12)*(1/n2+1/n4)*c).

compute x34=(r3-r4)**2/((N*(N+1)/12)*(1/n3+1/n4)*c).

compute p12=1-cdf.chisq(x12,2).
compute p13=1-cdf.chisq(x13,2).
compute p14=1-cdf.chisq(x14,2).

compute p23=1-cdf.chisq(x23,2).
compute p24=1-cdf.chisq(x24,2).

compute p34=1-cdf.chisq(x34,2).

execute.

大家好  以上这个有问题吗? 结果显示的是发现意外文件结尾 让查缺失值 但是 没有缺失呀 大家帮帮忙 谢谢

作者: zhenlima    时间: 2011-11-29 11:52
275932488 发表于 2011-3-7 09:23
回复 ahfyhp 的帖子

“compute H=(12*((r1*n1)**2/nl+(r2*n2)**2/n2+(r3*n3)**2/n3+(r4*n4)**2/n4))/(N* ...

data  list free /Hc r1 r2 r3 r4 r5 N n1 n2 n3 n4 n5.
begin data
46.816  83.69 74.69 70.37 94.59 142.12 183 39 38 38 38 33
end data .
compute H=(12*((r1*n1)**2/n1+(r2*n2)**2/n2+(r3*n3)**2/n3+(r4*n4)**2/n4+(r5+n5)**2/n5))/(N*(N+1))-3*(N+1).

compute C=H/Hc.

compute x12=(r1-r2)**2/((N*(N+1)/12)*(1/n1+1/n2)*c).
compute x13=(r1-r3)**2/((N*(N+1)/12)*(1/n1+1/n3)*c).
compute x14=(r1-r4)**2/((N*(N+1)/12)*(1/n1+1/n4)*c).
compute x15=(r1-r5)**2/((N*(N+1)/12)*(1/n1+1/n5)*c).

compute x23=(r2-r3)**2/((N*(N+1)/12)*(1/n2+1/n3)*c).
compute x24=(r2-r4)**2/((N*(N+1)/12)*(1/n2+1/n4)*c).
compute x25=(r2-r5)**2/((N*(N+1)/12)*(1/n2+1/n5)*c).

compute x34=(r3-r4)**2/((N*(N+1)/12)*(1/n3+1/n4)*c).
compute x35=(r3-r5)**2/((N*(N+1)/12)*(1/n3+1/n5)*c).

compute x45=(r4-r5)**2/((N*(N+1)/12)*(1/n4+1/n5)*c).

compute p12=1-cdf.chisq (x12,2).
compute p13=1-cdf.chisq (x13,2).
compute p15=1-cdf.chisq (x15,2).

compute p23=1-cdf.chisq (x23,2).
compute p24=1-cdf.chisq (x24,2).
compute p25=1-cdf.chisq (x25,2).

compute p34=1-cdf.chisq (x34,2).
compute p35=1-cdf.chisq (x35,2).

compute p45=1-cdf.chisq (x45,2).
execute.




请问版主我的这个程序有何问题 出来的HC是负的 P值都是1 我之前H检验时有差异的
谢谢了,我来回i黏贴复制坛里的程序 ,还没有成功过,出现的结果有几种:
1。 可以运行程序,但是没有结果,只有变量的名称;
2。 只有出现我填进去的H值和秩、样本量;
3。 HC是负的,P都是1!
请渊博的版主以及高人们赐教!愁死我了!
作者: zhenlima    时间: 2011-11-29 14:21
chengxiaomai 发表于 2011-11-28 00:06
data list free/Hc r1 r2 r3 r4  N n1 n2 n3 n4 .
begin data
41.89 27.06 33.50 26.23 64 22 16 6 20

我遇到和你一样的问题 一样头痛呢 求解!
作者: chengxiaomai    时间: 2011-11-29 19:14
我的已经解决了 当时太急了 没好好看 丢了Hc  不知你发现没有  祝好
作者: chengxiaomai    时间: 2011-11-29 19:17
有是太急了 没看到你上上的帖子  {:2_188:}
作者: 275932488    时间: 2011-12-1 21:09
chengxiaomai 发表于 2011-11-29 19:14
我的已经解决了 当时太急了 没好好看 丢了Hc  不知你发现没有  祝好

求助Nemenyi编程问题
http://tj211.com/forum.php?mod=v ... =2675&fromuid=2
已回复。类似问题。
作者: linxiuquan001    时间: 2011-12-1 22:13
riskeen 发表于 2011-11-26 11:07
为什么我的程序提示:
>Warning # 522
>Undefined error #522 - Cannot open text file "D:\spss\en\wind ...

少了其中一组的样本量
作者: hyxxjpp    时间: 2012-1-1 12:01
我的怎么到了execute就停止了,没有结果呢?下面是我的程序,请大侠帮我看看
data list free/Hc r1 r2 r3 r4 N n1 n2 n3 n4.
begin data
21.435 24.29 14.29 15.43 4 28 7 7 7 7
end data.
compute H=(12*((r1*n1)**2/n1+(r2*n2)**2/n2+(r3*n3)**2/n3+(r4*n4)**2/n4))/(N*(N+1))-3*(N+1).
compute c=H/Hc.
compute x12=(r1-r2)**2/((N*(N+1)/12)*(1/n1+1/n2)*c).
compute x13=(r1-r3)**2/((N*(N+1)/12)*(1/n1+1/n3)*c).
compute x14=(r1-r4)**2/((N*(N+1)/12)*(1/n1+1/n4)*c).
compute x23=(r2-r3)**2/((N*(N+1)/12)*(1/n2+1/n3)*c).
compute x24=(r2-r4)**2/((N*(N+1)/12)*(1/n2+1/n4)*c).
compute x34=(r3-r4)**2/((N*(N+1)/12)*(1/n3+1/n4)*c).
compute p12=1-cdf.chisq(x12,2).
compute p13=1-cdf.chisq(x13,2).
compute p14=1-cdf.chisq(x14,2).
compute p23=1-cdf.chisq(x23,2).
compute p24=1-cdf.chisq(x24,2).
compute p34=1-cdf.chisq(x34,2).
execute.



作者: 275932488    时间: 2012-1-2 10:39
hyxxjpp 发表于 2012-1-1 12:01
我的怎么到了execute就停止了,没有结果呢?下面是我的程序,请大侠帮我看看
data list free/Hc r1 r2 r3  ...

结果会新生成一个数据表。
作者: 云破月    时间: 2012-1-9 19:24
我的数据分为4组,每组5个样本,自己写的Nemenyi检验的程序如下,但老是出不了结果,求高人指点!跪谢!
data list free/Hc r1 r2 r3 r4 N n1 n2 n3 n4 n5.
begin data
12.406 3.00 14.60 10.20 14.20 20 5 5 5 5  
end data.
compute H=(12*((r1*n1)**2/n1+(r2*n2)**2/n2+(r3*n3)**2/n3+(r4*n4)**2/n4))/(N*(N+1))-3*(N+1).
compute c=H/Hc.
compute x12=(r1-r2)**2/((N*(N+1)/12)*(1/n1+1/n2)*c).
compute x13=(r1-r3)**2/((N*(N+1)/12)*(1/n1+1/n3)*c).
compute x14=(r1-r4)**2/((N*(N+1)/12)*(1/n1+1/n4)*c).
compute x23=(r2-r3)**2/((N*(N+1)/12)*(1/n2+1/n3)*c).
compute x24=(r2-r4)**2/((N*(N+1)/12)*(1/n2+1/n4)*c).
compute x34=(r3-r4)**2/((N*(N+1)/12)*(1/n3+1/n4)*c).
compute p12=1-cdf.chisq(x12,2).
compute p13=1-cdf.chisq(x13,2).
compute p14=1-cdf.chisq(x14,2).
compute p23=1-cdf.chisq(x23,2).
compute p24=1-cdf.chisq(x24,2).
compute p34=1-cdf.chisq(x34,2).
execute.

作者: 昆仑过客    时间: 2012-2-2 13:32
请问我有6组数据两两比较,但我的程序不能执行,请楼主看看,谢谢!
data list free/Hc r1 r2 r3 r4 r5 r6 N n1 n2 n3 n4 n5 n6.6 E/ W0 Z7 l+ R; r% ~0 t* C2 n
begin data
59.512 192.01 145.28 162.96 180.10 47.85 185.72
end data.# M- t8 E5 x& D. l$ W

compute H=(12*((r1*n1)**2/n1+(r2*n2)**2/n2+(r3*n3)**2/n3+(r4*n4)**2/n4+(r5*n5)**2/n5+(r6*n6)**2/n6))/(N*(N+1))-3*(N+1).

compute c=H/Hc.
# B% B2 o! g7 R( O' d
compute x12=(r1-r2)**2/((N*(N+1)/12)*(1/n1+1/n2)*c).
compute x13=(r1-r3)**2/((N*(N+1)/12)*(1/n1+1/n3)*c).
compute x14=(r1-r4)**2/((N*(N+1)/12)*(1/n1+1/n4)*c).+ u0 ^0 z- x. z- U
compute x15=(r1-r5)**2/((N*(N+1)/12)*(1/n1+1/n5)*c)." {8 m6 X5 N* B; A" u
compute x16=(r1-r6)**2/((N*(N+1)/12)*(1/n1+1/n6)*c).& [.
m1 t; d# W" f

compute x23=(r2-r3)**2/((N*(N+1)/12)*(1/n2+1/n3)*c).* Z% K, \5 n# a- T9 s# A4 z
compute x24=(r2-r4)**2/((N*(N+1)/12)*(1/n2+1/n4)*c).
compute x25=(r2-r5)**2/((N*(N+1)/12)*(1/n2+1/n5)*c).
compute x26=(r2-r6)**2/((N*(N+1)/12)*(1/n2+1/n6)*c).. u2
D9 p. F: i+ G: l$ v* }7 H4 p& xs" D( Q7 L1 n8 _

compute x34=(r3-r4)**2/((N*(N+1)/12)*(1/n3+1/n4)*c).! K1 }, t  S; B. e4 }0 n
compute x35=(r3-r5)**2/((N*(N+1)/12)*(1/n3+1/n5)*c).
compute x36=(r3-r6)**2/((N*(N+1)/12)*(1/n3+1/n6)*c).

7 k6 y! Q) `1 y2 u7 U5 Z
compute x45=(r4-r5)**2/((N*(N+1)/12)*(1/n4+1/n5)*c).- E0 g1 a  a6 d, ?1 p, ?$ q
compute x46=(r4-r6)**2/((N*(N+1)/12)*(1/n4+1/n6)*c).


compute x56=(r5-r6)**2/((N*(N+1)/12)*(1/n5+1/n6)*c).2 N% m% M, M  v% P/ T. f
/ Y4 {' P1 o
' z( s, p2 y6 L
compute p12=1-cdf.chisq(x12,2).
compute p13=1-cdf.chisq(x13,2).0 A5 L* d6 F3 d& n/ k
compute p14=1-cdf.chisq(x14,2).
compute p15=1-cdf.chisq(x15,2).+ s# u, K  x! x, C8 _. T( a
compute p16=1-cdf.chisq(x16,2).
9 T5 I' L  X) ^: @+ i
6 y. f# k$ g. D& ]7 S) U" ^
compute p23=1-cdf.chisq(x23,2).! @* F0 A$ i: ]; d5 ^
compute p24=1-cdf.chisq(x24,2).
compute p25=1-cdf.chisq(x25,2).
compute p26=1-cdf.chisq(x26,2).

) |; M  t$ J# w6 b, [& N. i5 N
compute p34=1-cdf.chisq(x34,2).0 p) N; F$ p! w. }1 b, o
compute p35=1-cdf.chisq(x35,2).
compute p36=1-cdf.chisq(x36,2).  i/ b/ c1 o1 K( ~! P5 v: z
~7 F3 A; H# B% @! H3 a1 s8 y
0 w9 }$ g) W5 s
compute p45=1-cdf.chisq(x45,2).5 M( p' w, K7 X$ `3 L6 m
compute p46=1-cdf.chisq(x46,2).


compute p56=1-cdf.chisq(x56,2).

5 B: ~( }) q# i- w
execute.




作者: 昆仑过客    时间: 2012-2-2 17:40
发错了,应该是data list free/Hc r1 r2 r3 r4 r5 r6 N n1 n2 n3 n4 n5 n6.
begin data
59.512 192.01 145.28 162.96 180.10 47.85 185.72 320 80 62 70 60 30 18
end data.
Compute
H=(12*((r1*n1)**2/n1+(r2*n2)**2/n2+(r3*n3)**2/n3+(r4*n4)**2/n4+(r5*n5)**2/n5+(r6*n6)**2/n6))/(N*(N+1))-3*(N+1).
compute c=H/Hc.
compute x12=(r1-r2)**2/((N*(N+1)/12)*(1/n1+1/n2)*c).
compute x13=(r1-r3)**2/((N*(N+1)/12)*(1/n1+1/n3)*c).
compute x14=(r1-r4)**2/((N*(N+1)/12)*(1/n1+1/n4)*c).
compute x15=(r1-r5)**2/((N*(N+1)/12)*(1/n1+1/n5)*c).
compute x16=(r1-r6)**2/((N*(N+1)/12)*(1/n1+1/n6)*c).
compute x23=(r2-r3)**2/((N*(N+1)/12)*(1/n2+1/n3)*c).
compute x24=(r2-r4)**2/((N*(N+1)/12)*(1/n2+1/n4)*c).
compute x25=(r2-r5)**2/((N*(N+1)/12)*(1/n2+1/n5)*c).
compute x26=(r2-r6)**2/((N*(N+1)/12)*(1/n2+1/n6)*c).
compute x34=(r3-r4)**2/((N*(N+1)/12)*(1/n3+1/n4)*c).
compute x35=(r3-r5)**2/((N*(N+1)/12)*(1/n3+1/n5)*c).
compute x36=(r3-r6)**2/((N*(N+1)/12)*(1/n3+1/n6)*c).
compute x45=(r4-r5)**2/((N*(N+1)/12)*(1/n4+1/n5)*c).
compute x46=(r4-r6)**2/((N*(N+1)/12)*(1/n4+1/n6)*c).
compute x56=(r5-r6)**2/((N*(N+1)/12)*(1/n5+1/n6)*c).
compute p12=1-cdf.chisq(x12,2).
compute p13=1-cdf.chisq(x13,2).
compute p14=1-cdf.chisq(x14,2).
compute p15=1-cdf.chisq(x15,2).
compute p16=1-cdf.chisq(x16,2).
compute p23=1-cdf.chisq(x23,2).
compute p24=1-cdf.chisq(x24,2).
compute p25=1-cdf.chisq(x25,2).
compute p26=1-cdf.chisq(x26,2).
compute p34=1-cdf.chisq(x34,2).
compute p35=1-cdf.chisq(x35,2).
compute p36=1-cdf.chisq(x36,2).
compute p45=1-cdf.chisq(x45,2).
compute p46=1-cdf.chisq(x46,2).
compute p56=1-cdf.chisq(x56,2)
execute.




作者: 昆仑过客    时间: 2012-2-2 17:42
仍不能正确执行,请问这是为何?
作者: 流沙浪    时间: 2012-2-13 16:03
请帮忙看看,我的对吗?怎么没法运行呢?
data list free/Hc r1 r2 r3 N n1 n2 n3.
begin data
10.974 9.29 14.50 3.80 18 7 6 5.
end data.

compute H=(12*((r1*n1)**2/n1+(r2*n2)**2/n2+(r3*n3)**2/n3))/(N*(N+1))-3*(N+1).

compute c=H/Hc.

compute x12=(r1-r2)**2/((N*(N+1)/12)*(1/n1+1/n2)*c).
compute x13=(r1-r3)**2/((N*(N+1)/12)*(1/n1+1/n3)*c).
compute x23=(r2-r3)**2/((N*(N+1)/12)*(1/n2+1/n3)*c).

compute p12=1-cdf.chisq(x12,2).
compute p13=1-cdf.chisq(x13,2).
compute p23=1-cdf.chisq(x23,2).

execute.

作者: linxiuquan001    时间: 2012-2-15 08:48
流沙浪 发表于 2012-2-13 16:03
请帮忙看看,我的对吗?怎么没法运行呢?
data list free/Hc r1 r2 r3 N n1 n2 n3.
begin data

数据最后多了一个“.”,修改后的程序如下:
  1. data list free/Hc r1 r2 r3 N n1 n2 n3.
  2. begin data
  3. 10.974 9.29 14.50 3.80 18 7 6 5
  4. end data.
  5. compute H=(12*((r1*n1)**2/n1+(r2*n2)**2/n2+(r3*n3)**2/n3))/(N*(N+1))-3*(N+1).
  6. compute c=H/Hc.
  7. compute x12=(r1-r2)**2/((N*(N+1)/12)*(1/n1+1/n2)*c).
  8. compute x13=(r1-r3)**2/((N*(N+1)/12)*(1/n1+1/n3)*c).
  9. compute x23=(r2-r3)**2/((N*(N+1)/12)*(1/n2+1/n3)*c).
  10. compute p12=1-cdf.chisq(x12,2).
  11. compute p13=1-cdf.chisq(x13,2).
  12. compute p23=1-cdf.chisq(x23,2).
  13. execute.
复制代码

作者: linxiuquan001    时间: 2012-2-15 08:53
昆仑过客 发表于 2012-2-2 17:42
仍不能正确执行,请问这是为何?

倒数第二行少了一个结束“.”,修改后的程序如下:
  1. data list free/Hc r1 r2 r3 r4 r5 r6 N n1 n2 n3 n4 n5 n6.
  2. begin data
  3. 59.512 192.01 145.28 162.96 180.10 47.85 185.72 320 80 62 70 60 30 18
  4. end data.
  5. Compute
  6. H=(12*((r1*n1)**2/n1+(r2*n2)**2/n2+(r3*n3)**2/n3+(r4*n4)**2/n4+(r5*n5)**2/n5+(r6*n6)**2/n6))/(N*(N+1))-3*(N+1).
  7. compute c=H/Hc.
  8. compute x12=(r1-r2)**2/((N*(N+1)/12)*(1/n1+1/n2)*c).
  9. compute x13=(r1-r3)**2/((N*(N+1)/12)*(1/n1+1/n3)*c).
  10. compute x14=(r1-r4)**2/((N*(N+1)/12)*(1/n1+1/n4)*c).
  11. compute x15=(r1-r5)**2/((N*(N+1)/12)*(1/n1+1/n5)*c).
  12. compute x16=(r1-r6)**2/((N*(N+1)/12)*(1/n1+1/n6)*c).
  13. compute x23=(r2-r3)**2/((N*(N+1)/12)*(1/n2+1/n3)*c).
  14. compute x24=(r2-r4)**2/((N*(N+1)/12)*(1/n2+1/n4)*c).
  15. compute x25=(r2-r5)**2/((N*(N+1)/12)*(1/n2+1/n5)*c).
  16. compute x26=(r2-r6)**2/((N*(N+1)/12)*(1/n2+1/n6)*c).
  17. compute x34=(r3-r4)**2/((N*(N+1)/12)*(1/n3+1/n4)*c).
  18. compute x35=(r3-r5)**2/((N*(N+1)/12)*(1/n3+1/n5)*c).
  19. compute x36=(r3-r6)**2/((N*(N+1)/12)*(1/n3+1/n6)*c).
  20. compute x45=(r4-r5)**2/((N*(N+1)/12)*(1/n4+1/n5)*c).
  21. compute x46=(r4-r6)**2/((N*(N+1)/12)*(1/n4+1/n6)*c).
  22. compute x56=(r5-r6)**2/((N*(N+1)/12)*(1/n5+1/n6)*c).
  23. compute p12=1-cdf.chisq(x12,2).
  24. compute p13=1-cdf.chisq(x13,2).
  25. compute p14=1-cdf.chisq(x14,2).
  26. compute p15=1-cdf.chisq(x15,2).
  27. compute p16=1-cdf.chisq(x16,2).
  28. compute p23=1-cdf.chisq(x23,2).
  29. compute p24=1-cdf.chisq(x24,2).
  30. compute p25=1-cdf.chisq(x25,2).
  31. compute p26=1-cdf.chisq(x26,2).
  32. compute p34=1-cdf.chisq(x34,2).
  33. compute p35=1-cdf.chisq(x35,2).
  34. compute p36=1-cdf.chisq(x36,2).
  35. compute p45=1-cdf.chisq(x45,2).
  36. compute p46=1-cdf.chisq(x46,2).
  37. compute p56=1-cdf.chisq(x56,2).
  38. execute.
复制代码

作者: linxiuquan001    时间: 2012-2-15 09:01
云破月 发表于 2012-1-9 19:24
我的数据分为4组,每组5个样本,自己写的Nemenyi检验的程序如下,但老是出不了结果,求高人指点!跪谢!
d ...

修改后的程序如下:

  1. data list free/Hc r1 r2 r3 r4 N n1 n2 n3 n4.
  2. begin data
  3. 12.406 3.00 14.60 10.20 14.20 20 5 5 5 5
  4. end data.
  5. Compute
  6. H=(12*((r1*n1)**2/n1+(r2*n2)**2/n2+(r3*n3)**2/n3+(r4*n4)**2/n4))/(N*(N+1))-3*(N+1).
  7. compute c=H/Hc.
  8. compute x12=(r1-r2)**2/((N*(N+1)/12)*(1/n1+1/n2)*c).
  9. compute x13=(r1-r3)**2/((N*(N+1)/12)*(1/n1+1/n3)*c).
  10. compute x14=(r1-r4)**2/((N*(N+1)/12)*(1/n1+1/n4)*c).
  11. compute x23=(r2-r3)**2/((N*(N+1)/12)*(1/n2+1/n3)*c).
  12. compute x24=(r2-r4)**2/((N*(N+1)/12)*(1/n2+1/n4)*c).
  13. compute x34=(r3-r4)**2/((N*(N+1)/12)*(1/n3+1/n4)*c).
  14. compute p12=1-cdf.chisq(x12,2).
  15. compute p13=1-cdf.chisq(x13,2).
  16. compute p14=1-cdf.chisq(x14,2).
  17. compute p23=1-cdf.chisq(x23,2).
  18. compute p24=1-cdf.chisq(x24,2).
  19. compute p34=1-cdf.chisq(x34,2).
  20. execute.
复制代码

作者: yixuelau    时间: 2012-2-21 02:34
您好,我的程序语言编好后出现如下:_SLINE 0 2.
data list free/Hc r1 r2 r3 r4 N n1 n2 n3 n4.
begin data
20.77 46.91 40.08 24.06 67 13 17 20 17
end date.
compute H=(12*((r1*n1)**2/n1+(r2*n2)**2/n2+(r3*n3)**2/n3+(r4*n4)**2/n4))/(N*(N+1))-3*(N+1).
compute C=H/Hc.
compute x12=(r1-r2)**2/((N*(N+1)/12)*(1/n1+1/n2)*c).
compute x12=(r1-r3)**2/((N*(N+1)/12)*(1/n1+1/n3)*c).
compute x14=(r1-r4)**2/((N*(N+1)/12)*(1/n1+1/n4)*c).
compute x23=(r2-r3)**2/((N*(N+1)/12)*(1/n2+1/n3)*c).
compute x24=(r2-r4)**2/((N*(N+1)/12)*(1/n2+1/n4)*c).
compute x34=(r3-r4)**2/((N*(N+1)/12)*(1/n3+1/n4)*c).
compute p12=1-cdf. chisq(x12,2).
compute p13=1-cdf. chisq(x13,2).
compute p14=1-cdf. chisq(x14,2).
compute p23=1-cdf. chisq(x23,2).
compute p24=1-cdf. chisq(x24,2).
compute p34=1-cdf. chisq(x34,2).
excute.
_SLINE OFF.
而我的程序语言是:
data list free/Hc r1 r2 r3 r4 N n1 n2 n3 n4.
begin data
20.77 46.91 40.08 24.06 67 13 17 20 17
end date.
compute H=(12*((r1*n1)**2/n1+(r2*n2)**2/n2+(r3*n3)**2/n3+(r4*n4)**2/n4))/(N*(N+1))-3*(N+1).
compute C=H/Hc.
compute x12=(r1-r2)**2/((N*(N+1)/12)*(1/n1+1/n2)*c).
compute x12=(r1-r3)**2/((N*(N+1)/12)*(1/n1+1/n3)*c).
compute x14=(r1-r4)**2/((N*(N+1)/12)*(1/n1+1/n4)*c).
compute x23=(r2-r3)**2/((N*(N+1)/12)*(1/n2+1/n3)*c).
compute x24=(r2-r4)**2/((N*(N+1)/12)*(1/n2+1/n4)*c).
compute x34=(r3-r4)**2/((N*(N+1)/12)*(1/n3+1/n4)*c).
compute p12=1-cdf. chisq(x12,2).
compute p13=1-cdf. chisq(x13,2).
compute p14=1-cdf. chisq(x14,2).
compute p23=1-cdf. chisq(x23,2).
compute p24=1-cdf. chisq(x24,2).
compute p34=1-cdf. chisq(x34,2).
excute.
请您帮我看看,我是哪出错了,非常感谢
作者: 275932488    时间: 2012-2-21 13:26
本帖最后由 275932488 于 2012-2-21 13:27 编辑
yixuelau 发表于 2012-2-21 02:34
您好,我的程序语言编好后出现如下:_SLINE 0 2.
data list free/Hc r1 r2 r3 r4 N n1 n2 n3 n4.
begin ...


错误太多,请重新编辑:
1 end data 而不是date
2 execute 而不是excute
3 x12重复了
。。。。
作者: yixuelau    时间: 2012-2-22 00:00
275932488 发表于 2012-2-21 13:26
错误太多,请重新编辑:
1 end data 而不是date
2 execute 而不是excute

谢谢,我知道了,修改后出结果了,太感谢您的帮助
作者: 275932488    时间: 2012-2-22 09:21
yixuelau 发表于 2012-2-22 00:00
谢谢,我知道了,修改后出结果了,太感谢您的帮助

{:1_176:}
作者: Miki^.⌒γ    时间: 2012-3-12 20:50
还有没有人呀
作者: pyudx1    时间: 2012-4-13 10:24
data list free/Hc r1 r2 r3 N n1 n2 n3.
begin data
16.808 20.30 21.60 7.0 31 10 10 11
end data.
compute H=(12*((r1*n1)**2/n1+(r2*n2)**2/n2+(r3*n3)**2/n3))/(N*(N+1))-3*(N+1).
compute c=H/Hc.
compute x12=(r1-r2)**2/((N*(N+1)/12)*(1/n1+1/n2)*c).
compute x13=(r1-r3)**2/((N*(N+1)/12)*(1/n1+1/n3)*c).
compute x23=(r2-r3)**2/((N*(N+1)/12)*(1/n2+1/n3)*c).
compute p12=1-cdf.chisq(x12,2).
compute p13=1-cdf.chisq(x13,2).
compute p23=1-cdf.chisq(x23,2).
execute.
这是我们的程序,但是总是运行error
data list free/Hc r1 r2 r3 N n1 n2 n3.
execute.

>Error # 119.  Command name: execute
>The in-line data must appear before a procedure can be executed and before the
>data can be modified in the data editor.
>This command not executed.
compute p23=1-cdf.chisq(x23,2).

>Error # 4285 in column 25.  Text: x23
>Incorrect variable name: either the name is more than 64 characters, or it is
>not defined by a previous command.
>This command not executed.
compute c=H/Hc.
compute x12=(r1-r2)**2/((N*(N+1)/12)*(1/n1+1/n2)*c).
compute x13=(r1-r3)**2/((N*(N+1)/12)*(1/n1+1/n3)*c).
compute x23=(r2-r3)**2/((N*(N+1)/12)*(1/n2+1/n3)*c).
compute p12=1-cdf.chisq(x12,2).
compute p13=1-cdf.chisq(x13,2).
compute p23=1-cdf.chisq(x23,2).
execute.
大侠麻烦看看
作者: linxiuquan001    时间: 2012-4-13 11:01
pyudx1 发表于 2012-4-13 10:24
data list free/Hc r1 r2 r3 N n1 n2 n3.
begin data
16.808 20.30 21.60 7.0 31 10 10 11

你的程序可正常运行,如下:
  1. data list free/Hc r1 r2 r3 N n1 n2 n3.
  2. begin data
  3. 16.808 20.30 21.60 7.0 31 10 10 11
  4. end data.
  5. compute H=(12*((r1*n1)**2/n1+(r2*n2)**2/n2+(r3*n3)**2/n3))/(N*(N+1))-3*(N+1).
  6. compute c=H/Hc.
  7. compute x12=(r1-r2)**2/((N*(N+1)/12)*(1/n1+1/n2)*c).
  8. compute x13=(r1-r3)**2/((N*(N+1)/12)*(1/n1+1/n3)*c).
  9. compute x23=(r2-r3)**2/((N*(N+1)/12)*(1/n2+1/n3)*c).
  10. compute p12=1-cdf.chisq(x12,2).
  11. compute p13=1-cdf.chisq(x13,2).
  12. compute p23=1-cdf.chisq(x23,2).
  13. execute.
复制代码
运行结果见附件:
结果.sav (1.5 KB, 下载次数: 298)
作者: pyudx1    时间: 2012-4-13 11:49
linxiuquan001 发表于 2012-4-13 11:01
你的程序可正常运行,如下:运行结果见附件:

大侠,谢谢你了,但是不知道为什么我总是下载不了你发的附件了。呵呵。难道是我的等级太低了?
作者: linxiuquan001    时间: 2012-4-13 11:51
pyudx1 发表于 2012-4-13 11:49
大侠,谢谢你了,但是不知道为什么我总是下载不了你发的附件了。呵呵。难道是我的等级太低了?

你没有统计币了,下载一个附件需要1个统计币。
作者: 依兰    时间: 2012-5-11 14:50
正在学习SPSS,从书上抄下来的例题,但是无法运行,一直在出现各种问题,请问原因是什么?
DATA LIST FREE / BLOCK COND DELUSION.
BEGIN DATA.
1 1 10.5
1        2        10.3
1        3        9.7
1        4        8.8
1        1        9.5
1        2        9.4
1        3        8.8
1        4        8.4
2        1        10.2
2        2        9.8
2        3        9.7
2        4        8.8
2        1        9.8
2        2        9.7
2        3        9.5
2        4        9.0
3        1        10.6
3        2        10.5
3        3        9.7
3        4        9.0
3        1        11.2
3        2        11.2
3        3        10.1
3        4        9.4
4        1        9.5
4        2        9.5
4        3        8.9
4        4        8.9
4        1        9.5
4        2        9.2
4        3        9.0
4        4        9.0
END DATA.
作者: 603asd    时间: 2012-7-1 15:25
多谢楼主大侠,特意注册致谢!
以后会常来学习。
再谢
作者: linxiuquan001    时间: 2012-7-1 16:12
依兰 发表于 2012-5-11 14:50
正在学习SPSS,从书上抄下来的例题,但是无法运行,一直在出现各种问题,请问原因是什么?
DATA LIST FREE ...

输入Kruskal-Wallis H 检验的结果
作者: linxiuquan001    时间: 2012-7-1 16:13
603asd 发表于 2012-7-1 15:25
多谢楼主大侠,特意注册致谢!
以后会常来学习。
再谢

谢谢支持,互相交流
作者: 梅子    时间: 2012-8-2 20:48
zhenlima 发表于 2011-11-29 11:52
data  list free /Hc r1 r2 r3 r4 r5 N n1 n2 n3 n4 n5.
begin data
46.816  83.69 74.69 70.37 94.59 ...

请问你的这个问题解决了吗?我遇到和你一样的问题:出来的HC是负的 ,P值都是1 我之前H检验时有差异的。
我的编程如下:data list free
/Hc r1 r2 r3 r4 r5 N n1 n2 n3 n4 n5.
begin data
120.269 145.16 233.98 248.56 257.31 367.49 500 100 100 100 100 100
end data.
COMPUTE H=(12*((r1*n1)**2/n1+(r2*n2)**2/n2+(r3*n3)**2/n3)+ (r4*n4)**2/n4+(r5*n5)**2/n5)/(N*(N+1))-3*(N+1).
compute C = H/Hc.
compute x12 = (r1-r2)**2/((N*(N+1)/12)*(1/n1+1/n2)*c).
compute x13 = (r1-r3)**2/((N*(N+1)/12)*(1/n1+1/n3)*c).
compute x14 = (r1-r4)**2/((N*(N+1)/12)*(1/n1+1/n4)*c).
compute x15 = (r1-r5)**2/((N*(N+1)/12)*(1/n1+1/n5)*c).
compute x23 = (r2-r3)**2/((N*(N+1)/12)*(1/n2+1/n3)*c).
compute x24 = (r2-r4)**2/((N*(N+1)/12)*(1/n2+1/n4)*c).
compute x25 = (r2-r5)**2/((N*(N+1)/12)*(1/n2+1/n5)*c).
compute x34 = (r3-r4)**2/((N*(N+1)/12)*(1/n3+1/n4)*c).
compute x35 = (r3-r5)**2/((N*(N+1)/12)*(1/n3+1/n5)*c).
compute x45 = (r4-r5)**2/((N*(N+1)/12)*(1/n4+1/n5)*c).
compute p12 = 1-cdf.chisq(x12,2).
compute p13 = 1-cdf.chisq(x13,2).
compute p14 = 1-cdf.chisq(x14,2).
compute p15 = 1-cdf.chisq(x15,2).
compute p23 = 1-cdf.chisq(x23,2).
compute p24 = 1-cdf.chisq(x24,2).
compute p25 = 1-cdf.chisq(x25,2).
compute p34 = 1-cdf.chisq(x34,2).
compute p35 = 1-cdf.chisq(x35,2).
compute p45 = 1-cdf.chisq(x45,2).
execute.

作者: 梅子    时间: 2012-8-2 20:50
zhenlima 发表于 2011-11-29 11:52
data  list free /Hc r1 r2 r3 r4 r5 N n1 n2 n3 n4 n5.
begin data
46.816  83.69 74.69 70.37 94.59 ...

请问你的这个问题解决了吗?我遇到和你一样的问题:出来的HC是负的 ,P值都是1 我之前H检验时有差异的。
麻烦你帮一下忙!~
我的编程如下:data list free
/Hc r1 r2 r3 r4 r5 N n1 n2 n3 n4 n5.
begin data
120.269 145.16 233.98 248.56 257.31 367.49 500 100 100 100 100 100
end data.
COMPUTE H=(12*((r1*n1)**2/n1+(r2*n2)**2/n2+(r3*n3)**2/n3)+ (r4*n4)**2/n4+(r5*n5)**2/n5)/(N*(N+1))-3*(N+1).
compute C = H/Hc.
compute x12 = (r1-r2)**2/((N*(N+1)/12)*(1/n1+1/n2)*c).
compute x13 = (r1-r3)**2/((N*(N+1)/12)*(1/n1+1/n3)*c).
compute x14 = (r1-r4)**2/((N*(N+1)/12)*(1/n1+1/n4)*c).
compute x15 = (r1-r5)**2/((N*(N+1)/12)*(1/n1+1/n5)*c).
compute x23 = (r2-r3)**2/((N*(N+1)/12)*(1/n2+1/n3)*c).
compute x24 = (r2-r4)**2/((N*(N+1)/12)*(1/n2+1/n4)*c).
compute x25 = (r2-r5)**2/((N*(N+1)/12)*(1/n2+1/n5)*c).
compute x34 = (r3-r4)**2/((N*(N+1)/12)*(1/n3+1/n4)*c).
compute x35 = (r3-r5)**2/((N*(N+1)/12)*(1/n3+1/n5)*c).
compute x45 = (r4-r5)**2/((N*(N+1)/12)*(1/n4+1/n5)*c).
compute p12 = 1-cdf.chisq(x12,2).
compute p13 = 1-cdf.chisq(x13,2).
compute p14 = 1-cdf.chisq(x14,2).
compute p15 = 1-cdf.chisq(x15,2).
compute p23 = 1-cdf.chisq(x23,2).
compute p24 = 1-cdf.chisq(x24,2).
compute p25 = 1-cdf.chisq(x25,2).
compute p34 = 1-cdf.chisq(x34,2).
compute p35 = 1-cdf.chisq(x35,2).
compute p45 = 1-cdf.chisq(x45,2).
execute.

作者: yoko    时间: 2013-1-8 21:18
楼主大人,下面是我的程序,就是跑不出来,我眼拙还没看出问题
data list free/Hc r1 r2 r3  r4 N n1 n2 n3 n4 .
begin data
24.057  1376.27 1285.81 1167.01 1354.03 2631  281 289 463 1598
end data.
compute H=(12*((r1*n1)**2/n1+(r2*n2)**2/n2+(r3*n3)**2/n3)+(r4*n4)**2/n4))/(N*(N+1))-3*(N+1).
compute c=H/Hc.
compute x12=(r1-r2)**2/((N*(N+1)/12)*(1/n1+1/n2)*c).
compute x13=(r1-r3)**2/((N*(N+1)/12)*(1/n1+1/n3)*c).
compute x14=(r1-r4)**2/((N*(N+1)/12)*(1/n1+1/n4)*c).
compute x23=(r2-r3)**2/((N*(N+1)/12)*(1/n2+1/n3)*c).
compute x24=(r2-r4)**2/((N*(N+1)/12)*(1/n2+1/n4)*c).
compute x34=(r3-r4)**2/((N*(N+1)/12)*(1/n3+1/n4)*c).
compute p12=1-cdf.chisq(x12,2).
compute p13=1-cdf.chisq(x13,2).
compute p14=1-cdf.chisq(x14,2).
compute p23=1-cdf.chisq(x23,2).
compute p24=1-cdf.chisq(x24,2).
compute p34=1-cdf.chisq(x34,2).
execute.
就是没有结果。只显示了秩和检验后的几个数值
作者: 西米    时间: 2013-4-13 19:44
梅子 发表于 2012-8-2 20:50
请问你的这个问题解决了吗?我遇到和你一样的问题:出来的HC是负的 ,P值都是1 我之前H检验时有差异的。
...

遇到同样的问题啊,看到有人提问还以为有解决,翻了几页都没有看到、、、哪位大侠可以帮帮忙~~~??
data list free
/Hc r1 r2 r3 r4 N n1 n2 n3 n4.
begin data
11.952 69.53 99.92 98.60 118.93 192 33 98 40 21
end data.
COMPUTE H = (12*((r1*n1)**2/n1+(r2*n2)**2/n2+(r3*n3)**2/n3)+(r4*n4)**2/n4)/(N*(N+1))-3*(N+1).
compute C = H/Hc.
compute x12 = (r1-r2)**2/((N*(N+1)/12)*(1/n1+1/n2)*c).
compute x13 = (r1-r3)**2/((N*(N+1)/12)*(1/n1+1/n3)*c).
compute x14 = (r1-r4)**2/((N*(N+1)/12)*(1/n1+1/n4)*c).
compute x23 = (r2-r3)**2/((N*(N+1)/12)*(1/n2+1/n3)*c).
compute x24 = (r2-r4)**2/((N*(N+1)/12)*(1/n2+1/n4)*c).
compute x34 = (r3-r4)**2/((N*(N+1)/12)*(1/n3+1/n4)*c).
compute p12 = 1-cdf.chisq(x12,2).
compute p13 = 1-cdf.chisq(x13,2).
compute p14 = 1-cdf.chisq(x14,2).
compute p23 = 1-cdf.chisq(x23,2).
compute p24 = 1-cdf.chisq(x24,2).
compute p34 = 1-cdf.chisq(x34,2).
execute.
作者: 西米    时间: 2013-4-14 15:51
请问,我和前面有好几个童鞋的遇到了同样的问题:Hc是负值,所有的p值都是1.00  请问这个为什么呢?麻烦帮帮忙~~~ 多谢多谢!
data list free
/Hc r1 r2 r3 r4 N n1 n2 n3 n4.
begin data
11.952 69.53 99.92 98.60 118.93 192 33 98 40 21
end data.
COMPUTE H = (12*((r1*n1)**2/n1+(r2*n2)**2/n2+(r3*n3)**2/n3)+(r4*n4)**2/n4)/(N*(N+1))-3*(N+1).
compute C = H/Hc.
compute x12 = (r1-r2)**2/((N*(N+1)/12)*(1/n1+1/n2)*c).
compute x13 = (r1-r3)**2/((N*(N+1)/12)*(1/n1+1/n3)*c).
compute x14 = (r1-r4)**2/((N*(N+1)/12)*(1/n1+1/n4)*c).
compute x23 = (r2-r3)**2/((N*(N+1)/12)*(1/n2+1/n3)*c).
compute x24 = (r2-r4)**2/((N*(N+1)/12)*(1/n2+1/n4)*c).
compute x34 = (r3-r4)**2/((N*(N+1)/12)*(1/n3+1/n4)*c).
compute p12 = 1-cdf.chisq(x12,2).
compute p13 = 1-cdf.chisq(x13,2).
compute p14 = 1-cdf.chisq(x14,2).
compute p23 = 1-cdf.chisq(x23,2).
compute p24 = 1-cdf.chisq(x24,2).
compute p34 = 1-cdf.chisq(x34,2).
execute.
不止这一组数据。。。。
作者: DYING    时间: 2013-7-20 12:57
菜鸟表示看不懂
作者: 文刀火丁    时间: 2013-7-21 10:15
高手真多啊,佩服~~~
作者: I'm_lin.    时间: 2013-7-30 21:58
高手,学习!
作者: tyl0829    时间: 2016-10-16 18:56
linxiuquan001 发表于 2011-1-3 11:21
回复 jack19850430 的帖子

并非大侠,一起交流{:1_176:}

好厉害啊大神 我照你的粘贴过来果然不提示错误了
作者: tyl0829    时间: 2016-10-16 19:00
zf123456 发表于 2011-1-10 17:52
**** 作者被禁止或删除 内容自动屏蔽 ****

我也是结果只显示execute,而没有数据 请问您是怎么解决的了呢
作者: tyl0829    时间: 2016-10-16 19:02
linxiuquan001 发表于 2011-1-10 22:14
回复 zf123456 的帖子

程序第一行少了一个“.”

好哒 看到啦 哇哇  大神就是大神啊!看到结果啦
作者: tyl0829    时间: 2016-10-16 19:13
linxiuquan001 发表于 2011-1-10 22:14
回复 zf123456 的帖子

程序第一行少了一个“.”

想再问一下 我执行命令前 需要将数据进行编秩以后再执行命令 还是直接拿原数据执行命令呢




欢迎光临 统计211 (http://tj211.com/) Powered by Discuz! X3.2