Flexible Rank-Preserving Correlation Engine

Implements a fast, flexible method for simulating continuous variables with specified rank correlations using the Iman–Conover transformation (Iman & Conover, 1982 ) and back-ranking. Includes plotting tools and error-diagnostics.


flexIC

flexIC is a high-precision Iman–Conover engine for generating continuous variables that preserve rank correlation with marginal fidelity. It offers tunable convergence control, allowing you to aggressively reduce rank-correlation distortion—at the cost of a few extra milliseconds.

Use it to:

  • Simulate data with a target Spearman or Kendall structure
  • Preserve original variable distributions via back-ranking
  • Validate or stress-test statistical methods under structured dependence

🚀 Why use flexIC?

Most Iman–Conover implementations:

  • Run once with no convergence check
  • Do not guarantee low error
  • Break marginal shapes in edge cases

flexIC:

  • Iterates until max abs rank-correlation error ≤ ε
  • Keeps original marginal shapes intact
  • Returns detailed error diagnostics
  • Finishes in milliseconds on typical datasets

📦 Installation

# Development version (until on CRAN)
remotes::install_github("TheotherDrWells/flexIC")

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("flexIC")

0.1.4 by Kevin Wells, a year ago


Browse source code at https://github.com/cran/flexIC


Authors: Kevin Wells [aut, cre]


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports ggplot2, MASS, stats

Suggests knitr, rmarkdown, mvtnorm, microbenchmark


See at CRAN