[R] Non-parametric Tests for location in R

David Winsemius dwinsemius at comcast.net
Thu Apr 15 14:17:56 CEST 2010

On Apr 14, 2010, at 7:19 PM, maithili davda wrote:

> How do I do the sign test and the sign rank test that SAS gives as  
> an output
> in proc univariate in R?
> sign.test
> and
> wilcox.test
> do not give the same output.

No data, no specifics, no code. Rather difficult to determine whether  
you made an error or  .... what?
> Also how do you pick what output you want displayed in R?
> like if I want only the test statistic and p value displayed and  
> nothing
> else how do I do that.

Most such functions return lists. One can look at the names of the  
components of such lists with str and extract the desired components.  
In the case of wilcox.test you do not need str because you can just go  
to the Value section of the help page and it's all laid out for you  
(as it should be.) You could assign the results to say, wres, and then :


David Winsemius, MD
West Hartford, CT

More information about the R-help mailing list