[R] One Sample Nonparametric

2009-05-17 Thread Charles Van deZande
Hi!
I'm doing one and two sample nonparametric tests for the median using wilcox
test.  For a one-sample test I  use: 
> wilcox.test(x, mu =50 (or whatever), y=NULL,correct=TRUE)
For two-sample test I use: 
> wilcox.test(x,y,correct=TRUE)
The problem is when I try to duplicate problems from textbooks, I get
p-values that are much different from the examples from the literature. 
They are off by as much as 30% to 40%.  Not even close.
Using an "exact" argument doesn't change the p-value.
What am I doing wrong?  Thanks for any help.
cvandy
   
Charles H Van deZande
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] One Sample Nonparametric

2009-05-17 Thread Dieter Menne
Charles Van deZande  gmail.com> writes:

> I'm doing one and two sample nonparametric tests for the median using wilcox
> test.  For a one-sample test I  use: 
> > wilcox.test(x, mu =50 (or whatever), y=NULL,correct=TRUE)
> For two-sample test I use: 
> > wilcox.test(x,y,correct=TRUE)
> The problem is when I try to duplicate problems from textbooks, I get
> p-values that are much different from the examples from the literature. 
> They are off by as much as 30% to 40%.  Not even close.
> Using an "exact" argument doesn't change the p-value.

> What am I doing wrong? 

You have not posted the textbook example you tested. You can use
dput to compactly post the data samples. Also check package coin.

Dieter

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.