Given a target r-value, returns the correlation you need to induce in a bivariate normal distribution to have the target correlation after converting distributions.
Arguments
- target_r
The target correlation
- dist1
The target distribution function for variable 1 (e.g., norm, binom, gamma, truncnorm)
- dist2
The target distribution function for variable 2
- params1
Arguments to pass to the functions for distribution 1
- params2
Arguments to pass to the functions for distribution 2
- tol
Tolerance for optimise function
Details
See Distributions for distributions and their various arguments to specify in params1 and params2.