[R] Wilcoxon test p value with one decimal place

Nordlund, Dan (DSHS/RDA) NordlDJ at dshs.wa.gov
Thu Feb 16 20:07:37 CET 2012


> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-
> project.org] On Behalf Of Jun Shen
> Sent: Thursday, February 16, 2012 10:16 AM
> To: R-help
> Subject: [R] Wilcoxon test p value with one decimal place
> 
> Dear list,
> 
> Let's say I have data
> 
>  a=c(37.961,38.214,57.68)
>  b=c(77.56,61.875,67.683)
> 
> wilcox.test(a,b)
> 
> the wilcoxon test only gives me a p value with one decimal place. Is
> this
> normal? Thanks.
> 
> Jun
> 

Well, it depends on what your p-value is.  If you try

w <- wilcox.test(a,b)
print(w$p.value, digits=20)

you will see that it is a rounding / printing issue


Hope this is helpful,

Dan

Daniel J. Nordlund
Washington State Department of Social and Health Services
Planning, Performance, and Accountability
Research and Data Analysis Division
Olympia, WA 98504-5204




More information about the R-help mailing list