pcorhc4sub <-
function(x,y,CN=FALSE){
#
# Compute a .95 confidence interval for Pearson's correlation coefficient.
# using the HC4 method
#
# CN=T degrees of freedom are infinite, as done by Cribari-Neto (2004)
# CN=F degrees of freedom are n-p
#
xy<-elimna(cbind(x,y))
x<-xy[,1]
y<-xy[,2]
z1=(x-mean(x))/sqrt(var(x))
z2=(y-mean(y))/sqrt(var(y))
ans=olshc4sub(z1,z2,CN=CN)
ci=ans$ci[2,3:4]
ci
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.