[R] wilcox.test and ties

Timo Mäkeläinen Timo.Makelainen at helsinki.fi
Fri Jul 19 19:03:19 CEST 2002


On 19 Jul 2002, at 18:59, Timo Mäkeläinen wrote:

> On 19 Jul 2002, at 15:16, Swanepoel, Christiaan Edward wrote:
> 
> > Hello,
> > 
> > when performing the wilcox.test on a sample (n=100) with the
> > following frequency distribution: Value	|	Frequency
> > ---------------------------------------- 0	|	10 0.1	|	88 1	|	1
> > 2.6	|	1
> > 
> > I get the following error message:
> > 
> > Error in uniroot(wdiff, c(mumin, mumax), tol = 1e-04, zq =
> > qnorm(alpha/2,  : 
> >  f() values at end points not of opposite sign
> > 
> > The error only occurs when I specify that the confidence interval
> > should be computed.
> > 
> > Could anybody suggest how I can compute the confidence interval for
> > this sample? Is the problem connected with the large number of ties
> > and if so, how can I handle these ties?
> 
> >From the help:
> 
> "By default (if exact is not specified), an exact p-value is computed
> if the samples contain less than 50 finite values and there are no
> ties. Otherwise, a normal approximation is used."
> 
> The error message tells that a normal approximation is being 
> attempted. 

Suggesting that  some ties have been correctly recognised.

On the other hand, I would rather not rely on a normal
> approximation here. With so few observations differing from 0.1, a
> hand computation might be easy for a high confidence level. 
> 
> In general, for the correct handling of ties entering data like yours
> as round( x, 1) can be tried.

Better, look at the code to see how they are handled.

> > Thanks in advance.
> > 
> > Regards
> > Chris
> > 
> > -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
> > -. -.-.-.-.- r-help mailing list -- Read
> > http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help",
> > or "[un]subscribe" (in the "body", not the subject !)  To:
> > r-help-request at stat.math.ethz.ch
> > _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._.
> > _. _._._._._
> 
> Timo
> 
> 
> Timo Makelainen, Department of Mathematics
> University of Helsinki, P.O. Box 4 
> FIN-00014 Helsinki 
> Tel.: +358-9-19122863 
> Fax:  +358-9-19123213
> E-mail: Timo.Makelainen at Helsinki.Fi
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
> -.-.-.-.- r-help mailing list -- Read
> http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help",
> or "[un]subscribe" (in the "body", not the subject !)  To:
> r-help-request at stat.math.ethz.ch
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._.
> _._._._._

Timo
Timo Makelainen, Department of Mathematics
University of Helsinki, P.O. Box 4 
FIN-00014 Helsinki 
Tel.: +358-9-19122863 
Fax:  +358-9-19123213
E-mail: Timo.Makelainen at Helsinki.Fi
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list