This function can be used to find a suitable initial correlation for use in the NORTA procedure for a pair of variables with given marginal distributions and target correlation.
optimize_cor_for_pair(
cor_target,
dist1,
dist2,
n_obs = 1e+05,
seed = NULL,
tol = 0.01,
...
)
Output of stats::uniroot
for the univariable
optimization for find the initial correlation.
Target correlation of variable pair.
Marginal distributions of variable pair, given as univariable quantile functions.
Number of observations to be used in the numerical optimization procedure.
Seed for generating standard normal random variables in the numerical optimization procedure.
Further parameters passed to stats::uniroot
.
Uses stats::uniroot
for actual optimization.