[R] Bootstrapping kendall cor

About this list Date view Thread view Subject view Author view Attachment view

From: Hwange Project (ciradhwg@mweb.co.zw)
Date: Thu 13 May 2004 - 21:49:28 EST


Message-id: <IEEFKHGFNDGNNFCJALMFGEGDCEAA.ciradhwg@mweb.co.zw>

Dear R-helpers,
I'm fighting with the following problem :
I want to do bootstrapping on a Kendall correlation with the following code
:

> cor.function <- function(data,i) cor(data[i, 1], data[i,
2],method="kendall")
> boot.ci <- boot.ci(boot.cor <- boot(cbind(x,y),cor.function,
     R=1000),conf=c(0.95,0.99))

However, I've got problems because I've got ties in my x variables :
for example, it does not work with :

x <-
c(8.67,3.67,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,6.80,0.00,0.00,3.96)
y <- c(329,264,274,339,302,334,334,312,355,327,287,319,361,355)
cor.function <- function(data,i) cor(data[i, 1], data[i,
2],method="kendall")
boot.ci <- boot.ci(boot.cor <- boot(cbind(x,y),cor.function,
     R=1000),conf=c(0.95,0.99))

I would appreciate any advice, even of changing from kendall to something
else, knowing that my x variables have a lot of ties and is far from
normally distributed.
Thanks
simon
---------------------------------------------------------
Simon Chamaillé
Hwange Project
CIRAD-CNRS
Hwange Main Camp Research
P. Bag 5776, Dete
(+00 263) 18-647
ciradhwg@mweb.co.zw

        [[alternative HTML version deleted]]

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


About this list Date view Thread view Subject view Author view Attachment view

This archive was generated by hypermail 2.1.3 : Mon 31 May 2004 - 23:05:09 EST