|
本帖最后由 tiangang198285 于 2011-2-22 10:57 编辑
[我在使用Nemenyi程序时遇到以下问题,恳求大家能够帮忙看看错在哪里:
编写的程序如下:
data list FREE/Hc r1 r2 r3 N n1 n2 n3.
begin data.
28.01 6.18 16.82 28.00 33 11 11 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.
输出的结果与上面的一样的:
data list FREE/Hc r1 r2 r3 N n1 n2 n3.
begin data.
28.01 6.18 16.82 28.00 33 11 11 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.
就是程序不计算出X2(卡方值)和p值,请大家指教一下,谢谢!我不知道错在哪里了。
补充一点:我后来把上面的(r1*n1)**2改成(r1*n1)*(r1*n1)后输出结果提示错误(如下),我在该目录下放入一个spss.err(文本文档改后缀名生成的)的文件后还是不行,我用的版本是17.0的版本。
data list FREE/Hc r1 r2 r3 N n1 n2 n3.
begin data.
28.01 6.18 16.82 28.00 33 11 11 11
end data.
compute H=(12*((r1*n1)(r1*n1)/n1+(r2*n2)*(r2*n2)/n2+(r3*n3)*(r3*n3)/n3))/(N*(N+1))-3*(N+1).
>Error # 4010. Command name: compute
>Undefined error #4010 - Cannot open text file "C:\Program Files\SPSSInc\Statistics17\lang\en\spss.err": No such file or directory
>This command not executed.
compute c=H/Hc.
>Error # 4285. Command name: compute
>Undefined error #4285 - Cannot open text file "C:\Program Files\SPSSInc\Statistics17\lang\en\spss.err": No such file or directory
>This command not executed.
compute x12=(r1-r2)*(r1-r2)/((N*(N+1)/12)*(1/n1+1/n2)*c).
>Error # 4285. Command name: compute
>Undefined error #4285 - Cannot open text file "C:\Program Files\SPSSInc\Statistics17\lang\en\spss.err": No such file or directory
>This command not executed.
compute x13=(r1-r3)*(r1-r3)/((N*(N+1)/12)*(1/n1+1/n3)*c).
>Error # 4285. Command name: compute
>Undefined error #4285 - Cannot open text file "C:\Program Files\SPSSInc\Statistics17\lang\en\spss.err": No such file or directory
>This command not executed.
compute x23=(r2-r3)*(r2-r3)/((N*(N+1)/12)*(1/n2+1/n3)*c).
>Error # 4285. Command name: compute
>Undefined error #4285 - Cannot open text file "C:\Program Files\SPSSInc\Statistics17\lang\en\spss.err": No such file or directory
>This command not executed.
compute p12=1-CDF.CHISQ(x12,2).
>Error # 4285. Command name: compute
>Undefined error #4285 - Cannot open text file "C:\Program Files\SPSSInc\Statistics17\lang\en\spss.err": No such file or directory
>This command not executed.
compute p13=1-CDF.CHISQ(x13,2).
>Error # 4285. Command name: compute
>Undefined error #4285 - Cannot open text file "C:\Program Files\SPSSInc\Statistics17\lang\en\spss.err": No such file or directory
>This command not executed.
compute p23=1-CDF.CHISQ(x23,2).
>Error # 4285. Command name: compute
>Undefined error #4285 - Cannot open text file "C:\Program Files\SPSSInc\Statistics17\lang\en\spss.err": No such file or directory
>This command not executed.
execute.
|
|