Reorder draws to a target correlation (Iman-Conover)
iman_conover.RdEvery component keeps exactly its own draws; only their pairing across
simulations changes. The correlation of the result's normal scores is
close to correlation, and Spearman's rho close to
(6 / pi) * asin(correlation / 2).
Arguments
Value
A predictive_distribution with the same keys and marginals.
Examples
pd <- predictive_distribution(
cbind(1:1000, (1:1000 * 7919) %% 1000),
data.frame(lob = c("a", "b"))
)
joined <- iman_conover(pd, matrix(c(1, 0.7, 0.7, 1), 2), seed = 3)
cor(draw_matrix(joined), method = "spearman")
#> [,1] [,2]
#> [1,] 1.0000000 0.6815972
#> [2,] 0.6815972 1.0000000