# NOT RUN {
col1 <- rep(1,4)
col2 <- c(-1, 1, -1, 1)
col3 <- c(-1, -1, 1, 1)
col4 <- c(1, -1, -1, 1)
X.single.rep <- cbind(col1, col2, col3, col4)
X <- rbind(X.single.rep, X.single.rep, X.single.rep)
a.vec <- c(0, 2, 0, -2)
c.vec <- c(0, 0, 0, 1)
# Find the value of rho
rho <- find_rho(X, a=a.vec, c=c.vec)
rho
# The value of rho is -0.7071068
# }
Run the code above in your browser using DataLab