Re: [R] A questionb about the Wilcoxon signed rank test

2010-04-05 Thread Peter Ehlers
Since this may be homework, I'll confine myself to a hint (which may or may not be the problem; I haven't checked): The formula you use for z is strongly dependent on the value of 'n'. -Peter Ehlers On 2010-04-05 6:06, hix li wrote: Hi guys, I have two data sets of prices: endprice0, endpric

Re: [R] A questionb about the Wilcoxon signed rank test

2010-04-05 Thread Thomas Lumley
The problem is that your data contains ties, which mess up the nice theory and result in different people using different approximations. I don't know where your z-statistic formula comes from, but you can find the one R uses by looking at the source code in stats:::wilcox.test.default. To s

Re: [R] A questionb about the Wilcoxon signed rank test

2010-04-05 Thread David Winsemius
On Apr 5, 2010, at 8:06 AM, hix li wrote: Hi guys, I have two data sets of prices: endprice0, endprice1 I use the Wilcox test: wilcox.test(endprice0, endprice1, paired = TRUE, alternative = "two.sided", conf.int = T, conf.level = 0.9) The result is with V = 1819, p-value = 0.8812. Then