[R] kendall's w
Bianca Vieru
bianca.vieru at free.fr
Wed Sep 13 18:57:36 CEST 2006
Hi,
I try to calculate Kendall's W coefficient and I have a bizarre error.
little.app.mat<-matrix(c(1,3,4,2,6,5,2,4,3,1,5,6,3,2,5,1,5,4),nrow=3,byrow=TRUE)
print(kendall.w(little.app.mat[-1,]))
>>> Kendall's W for ordinal data
>>> W = 0.7753623Error in if (is.na(x$p.table)) { : argument is of
length zero
big.app.mat<-matrix(c(1,3,4,2,6,5,2,4,3,1,5,6,3,2,5,1,5,42,3,5,3,6,7,9,9,8,7),nrow=3,byrow=TRUE)
print(kendall.w(big.app.mat[-1,]))
>>>Kendall's W for ordinal data
>>>W = 0.4568966 p(X2[8]) = 0.5035488
Why is that working for the big matrix and not for the little one?
Thanks,
Bianca
More information about the R-help
mailing list