As others have said, the number of possible answers here is endless. We can ignore the issue of the actual distribution. Obviously, for shift and scale distributions, the regression approach is the easiest method to generate correlated data, but it's not an omnibus. Beta RVs are not shift/scale distributions, as you have clearly noticed, if you add 1 to a Beta random variable, it is no longer Beta distributed. The copula method is the most theoretically sound approach for which there are several papers, code examples, and R packages.
In R, a very interesting method is just to sort arrays. Back to your case, simulate independent Beta random variables stored in a matrix. and for a desired correlation, choose a number of rows proportional to that correlation and jointly sort those rows. To gain a closer match, you can iteratively sort more or less rows until convergence is met. Sorting the vectors maintains the univariate distributional properties.
The below example is by no means an efficient implementation, but rather an illustrative example.
## initial setup
set.seed(123)
n <- 100
x <- matrix(rbeta(n*2, 2, 2), n, 2)
user supplied desired correlation
p <- 0.5
np is the number of rows to sort, npprev and npnext to evaluate convergence
npprev <- np
np <- np
xnew <- x
xnew[1:np, ] <- apply(xnew[1:np, ], 2, sort)
pest <- cor(xnew[,1], xnew[ ,2])
add 1 row to sort if under correlated, subtract 1 row if overcorrelated
npnext <- np + sign(p-pest)
iterative until exact match OR alternating pattern reached
while (pest != p & npnext != npprev ) {
npprev <- np
np <- npnext
xnew <- x
xnew[1:np, ] <- apply(xnew[1:np, ], 2, sort)
pest <- cor(xnew[,1], xnew[ ,2])
npnext <- np + sign(p-pest)
}
Y1orY2from being outside $(0,1)$ so they cannot be beta distributed? – Christoph Hanck Jun 13 '17 at 15:17nproportions for the pre-test stage, andnproportions for the post-test stage. But I want to assume that the proportions in the pre-test and the post-test are positively correlated by some known degree in the mother populations. – rnorouzian Jun 13 '17 at 16:39