Find pairwise initial correlation for NORTA from target correlation
Source:R/utilities.R
optimize_cor_for_pair.Rd
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.
Usage
optimize_cor_for_pair(
cor_target,
dist1,
dist2,
n_obs = 1e+05,
seed = NULL,
tol = 0.01,
...
)
Arguments
- cor_target
Target correlation of variable pair.
- dist1, dist2
Marginal distributions of variable pair, given as univariable quantile functions.
- n_obs
Number of observations to be used in the numerical optimization procedure.
- seed
Seed for generating standard normal random variables in the numerical optimization procedure.
- tol, ...
Further parameters passed to
stats::uniroot
.
Value
Output of stats::uniroot
for the univariable
optimization for find the initial correlation.
Details
Uses stats::uniroot
for actual optimization.