optimize_cor_for_pair {simdata}R Documentation

Find pairwise initial correlation for NORTA from target correlation

Description

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.

Details

Uses stats::uniroot for actual optimization.

Value

Output of stats::uniroot for the univariable optimization for find the initial correlation.


[Package simdata version 0.4.0 Index]