How to generate binary data using Cholesky decomposition in R? m <- matrix(nrow=5, ncol=5)  
m <- ifelse(row(m)==col(m), 1, 0.4)  
ch <- chol(m)    # Choleski decomposition  
u <- matrix(rnorm(2000*5), ncol=5)  
uc <- u %*% ch  
cr <- pnorm(uc)  
cr <- qbinom(cr,1,0.5)  
cor(uc)  
cor(cr)   

The cor(uc) is 0.4. However, I also expected the cor(cr) to be 0.4, but it is around 0.2.
Why the correlation is shrunken?
 A: I'm going to go ahead and copy most of my answer from StackOverflow here:
You may want to look into the literature on copulas. I believe that what you are doing here is basically constructing a Gaussian copula (Wikipedia): maybe this is already obvious to you, maybe not ... For example, http://www.casact.org/library/02pcas/venter.pdf states

The linear correlation coefficient based on the covariance of two
  variates is not preserved by copulas. That is, two pairs of correlated
  variates with the same copula can have different correlations.
  However, the Kendall correlation, usually denoted by τ, is a constant
  of the copula. That is, any correlated variates with the same copula
  will have the τ of that copula.

As suggested by @Glen_b's comment, you don't necessarily need Cholesky to do this -- there are lots of ways to generate correlated multivariate normal Gaussian data (MASS::mvrnorm is probably the most widely used R function: it uses an eigenvector rotation).
A: By converting an interval scaled set of numbers with a given correlation (mostly concentrated around 0) over to a 1/0 scale you, on average, drove the pairs further apart on the squared distance scale. In thinking about this for its implications to coders it is probably that the unnecessary conversion of interval data to binomial data is going to decrease the power of your investigations into the data relationships. An investigation into count data outcomes conducted with Poisson regression is likely to reveal more than if the outcomes were coded into 1/0 depending on whether the counts were above or below any particular cutpoint. There's probably a proof that could be exhibited but demonstration of probability theorems is not what SO is about. If you want a more mathematical explanation, there is always the stats.stackexchange.com interface.
