R和SAS中的Wilcoxon秩和检验配对数据

时间:2018-10-25 13:29:09

标签: r sas

我想比较两个周期(1和2)之间的数据以获取配对数据。 我使用了wilcoxon秩和检验,但是从R中获得了两个不同的结果,其中一个等于SAS。

哪个是我的数据中正确的一个?

   wilcox.test(val ~ time, data = pcs, paired = TRUE)


        Wilcoxon signed rank test

    data:  val by time
    V = 9, p-value = 0.4688
    alternative hypothesis: true location shift is not equal to 0

    > pcs$val<-as.numeric(pcs$val)
    > pcs$time<-as.numeric(pcs$time)
    > wilcox.test(pcs$time,pcs$val, paired = TRUE)

        Wilcoxon signed rank test

    data:  pcs$time and pcs$val
    V = 50, p-value = 0.9032
    alternative hypothesis: true location shift is not equal to 0

    La procedura UNIVARIATE
    Variabile: pcs

    Moments 
N 7 Sum Weights 7 
Mean 10.5371745 Sum Observations 73.7602214 
Std Deviation 32.3329768 Variance 1045.42139 
Skewness -0.2374077 Kurtosis -0.6500825 
Uncorrected SS 7049.75266 Corrected SS 6272.52833 
Coeff Variation 306.846744 Std Error Mean 12.2207165 



Basic Statistical Measures 
Location Variability 
Mean 10.53717 Std Deviation 32.33298 
Median 7.58871 Variance 1045 
Mode . Range 93.59909 
    Interquartile Range 56.97430 



Tests for Location: Mu0=0 
Test Statistic p Value 
Student's t t 0.862239 Pr > |t| 0.4217 
Sign M 1.5 Pr >= |M| 0.4531 
Signed Rank S 5 Pr >= |S| 0.4688 



Quantiles (Definition 5) 
Level Quantile 
100% Max 55.37457 
99% 55.37457 
95% 55.37457 
90% 55.37457 
75% Q3 36.56551 
50% Median 7.58871 
25% Q1 -20.40879 
10% -38.22452 
5% -38.22452 
1% -38.22452 
0% Min -38.22452 



Extreme Observations 
Lowest Highest 
Value Obs Value Obs 
-38.22452 5 7.18289 6 
-20.40879 1 7.58871 7 
7.18289 6 25.68185 4 
7.58871 7 36.56551 2 
25.68185 4 55.37457 3 

我通常使用SAS,但是看这个图,p值0.4688对我来说太奇怪了:

enter image description here

所以我尝试了R,但是我没有明显的区别,所以我不明白...

非常感谢您!

0 个答案:

没有答案