# create 8 dimensional symmetric positive correlation matrix with random entries
Cin <- unstructured(8)
Cin
Theta <- c2pc(Cin)
Theta
# transform Theta back to obtain the correlation matrix
pc2c(Theta)
# identical with Cin
pc2c(Theta) - Cin
Run the code above in your browser using DataLab