# Compute the coefficient and compare to the xi coefficient
simulCompare <- function(n = 20, B = 1000)
{
diffs<- rep(0,B)
xvec <- 1:n
for (i in 1:B)
{
yvec <- runif(n)
diffs[i] <- FRpredcor(xvec, yvec) - xicor(xvec, yvec)
}
return(diffs)
}
simulcompare1K <- simulCompare()
summary(simulcompare1K)
Run the code above in your browser using DataLab