I derive data from a multivariate normal distribution. I created the correlation structure I wanted by the sigma matrix. Since I take the standard deviation as 1, I expect the Sigma matrix and correlation of Z matrix to be the same, but it is not the same. how do i solve this problem? So, how can I derive data from the multivariate normal distribution according to the correlation matrix I want?
blck1 <- c(1:8)
blck2 <- c(9:20)
pr <- seq(0.05, 0.01, length.out = 20)
Sigma <- toeplitz(pr)
#### Blok1 ###############
pr_blck1 <- seq(0.7, 0.3, length.out = length(blck1))
Sigma_blck1 <- toeplitz(pr_blck1)
Sigma[blck1, blck1] <- Sigma_blck1
diag(Sigma) <- 1
Z <- rmvnorm(n= 50,
mean = rep(0, 20),
sigma = Sigma )
Sigma
cor(Z)