Skip to content

(no subject)

2 messages · fang lai, Adaikalavan Ramasamy

#
Hi there,
 When I ran the wilcox.exact test, it always shows
"number of items to replace is not a multiple of
replacement length"
 However, according to the help it seems to be able to
handle sample of different size.
What does this message indicate, and will it cause a
problem of the resulting p-value?
 Also, when I run the ks.test(), it shows sometimes
that 
cannot compute correct p-values with ties in:
ks.test(income.perm[(data[, 3] == 59) & (data[, 2] ==
1)], income.perm[(data[,   ...

And sometime it shows results and sometimes it just
return NULL. When it shows the results, does it mean
that it had some kind of continuity correction or
other adjustment so that I could believe the results? 
Many thanks,

Fang 


=====
Lai, Fang

PhD candidate
University of California, Berkeley
Department of Agricultural and Resource Economics
314 Giannini Hall, Berkeley, CA 94720-3310
tel: (510) 643 - 5421(O)
     (510) 847 - 9811(Cell)
fax: (510) 643 - 8911
email: lai at are.berkeley.edu
http://www.are.berkeley.edu/jobmarket/fang.html
#
Reading the posting guide will tell you (among other things) to :
 a) use a sensible subject line
 b) give a reproducible example when possible

See other comments below.
On Wed, 2004-11-03 at 19:04, fang lai wrote:
I think the error refers to incorrect lengths during assignment. See
example below.
[,1] [,2]
[1,]    1    3
[2,]    2    4
[1] 1 3
Error in "[<-"(`*tmp*`, 1, , value = 1:3) :
    number of items to replace is not a multiple of replacement length

Or you might be trying something like
Error in "[<-"(`*tmp*`, 1, , value = wilcox.test(1:3, 1:10)) :
    number of items to replace is not a multiple of replacement length


Wilcoxon and all other two-group test statistics (when pairing is not
involved) can handle groups of different size. 
Try wilcox.test( 1:3, 1:10 ). 
To extract p-value only, do wilcox.test( 1:3, 1:10 )$p.value
Not directly. You could be expecting p-values to be in, say the 5th
column, but it might be stored elsewhere. But in your case I think the
results will not be stored anyway.
Is this a warning or an error ? There is a distinction.