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.
|