I was wondering if it might be possible to generate 2 correlated $Beta$ random variables?
In other words, I want to generate two Beta random variables which can be said to have come from two Beta distributions whose correlation is known to be "$\rho =$ some number"?
In R, I tried a simple linear transformation approach to achieve this:
set.seed(0) X1 = rbeta(1e4, 5, 1) ; X2 = rbeta(1e4, 6, 1) ; X3 = rbeta(1e4, 7, 1) ; a = -.5 Y1 = X1 + (a*X2) ; Y2 = X2 + (a*X3) ## Y1 and Y2 are meant to be correlated cor(Y1, Y2) plot(Y1~Y2, col = densCols(Y1, Y2) ) ; abline(lm(Y1~Y2), lty = 3, lwd = 2)
But the linear transformation approach above is particularly unprincipled. If you change
.5, then the meant-to-be $Beta$ random variables go beyond 1:
P.S. There is apparently a principled way to do this as shown HERE.