R/cor.boot.ci.r

Defines functions cor.boot.ci

Documented in cor.boot.ci

cor.boot.ci<-function(x,y,method='spearman',conf=0.95,nbs=3000) {
  quantile(
    boot::boot(cbind(x,y),function(d,i) cor(d[i,1],d[i,2],method=method),R=nbs)$t, 
    probs=c((1-conf)/2,1-(1-conf)/2) 
  )
}

Try the npsm package in your browser

Any scripts or data that you put into this service are public.

npsm documentation built on Nov. 15, 2023, 1:08 a.m.