optimize_cor_for_pair | R Documentation |
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,
...
)
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 |
Uses stats::uniroot
for actual optimization.
Output of stats::uniroot
for the univariable
optimization for find the initial correlation.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.