twodcor8 <-
function(x,y){
#
# Compute a .95 confidence interval for
# the difference between two dependent
# correlations corresponding to two independent
# goups.
#
#
# x is a matrix with two columns,
# y is a vector
# Goal: test equality of Pearson correlation for x1, y versus x2, y.
#
# For general use, twodcor10 is probably better,
# which calls this function and estimates an adjusted p-value.
#
X<-elimna(cbind(x,y))
Z1<-(X[,1]-mean(X[,1]))/sqrt(var(X[,1]))
Z2<-(X[,2]-mean(X[,2]))/sqrt(var(X[,2]))
temp<-cor.test(Z1-Z2,X[,3])
temp<-temp[3]$p.value
list(p.value=temp)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.