Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The rank correlation method of <a href="http://www.informaworld.com/index/780064783.pdf" rel="noreferrer">Iman and Conover</a> seems to be a widely used and general approach to producing correlated monte carlo samples for computer based experiments, sensitivity analysis etc. Unfortunately I have only just come across this and don't have access to the PDF so don't know how the authors <em>actually</em> implement their method, but you could follow this up.</p> <p>Their method is more general because each variable can come from a different distribution unlike the multivariate normal of @Dirk's answer.</p> <p><strong>Update:</strong> I found an R implementation of the above approach in package <a href="http://cran.r-project.org/web/packages/mc2d/index.html" rel="noreferrer"><code>mc2d</code></a>, in particular you want the <a href="http://finzi.psych.upenn.edu/R/library/mc2d/html/cornode.html" rel="noreferrer"><code>cornode()</code></a> function.</p> <p>Here is an example taken from <code>?cornode</code></p> <pre><code>&gt; require(mc2d) &gt; x1 &lt;- rnorm(1000) &gt; x2 &lt;- rnorm(1000) &gt; x3 &lt;- rnorm(1000) &gt; mat &lt;- cbind(x1, x2, x3) &gt; ## Target &gt; (corr &lt;- matrix(c(1, 0.5, 0.2, 0.5, 1, 0.2, 0.2, 0.2, 1), ncol=3)) [,1] [,2] [,3] [1,] 1.0 0.5 0.2 [2,] 0.5 1.0 0.2 [3,] 0.2 0.2 1.0 &gt; ## Before &gt; cor(mat, method="spearman") x1 x2 x3 x1 1.00000000 0.01218894 -0.02203357 x2 0.01218894 1.00000000 0.02298695 x3 -0.02203357 0.02298695 1.00000000 &gt; matc &lt;- cornode(mat, target=corr, result=TRUE) Spearman Rank Correlation Post Function x1 x2 x3 x1 1.0000000 0.4515535 0.1739153 x2 0.4515535 1.0000000 0.1646381 x3 0.1739153 0.1646381 1.0000000 </code></pre> <p>The rank correlations in <code>matc</code> are now very close to the target correlations of <code>corr</code>.</p> <p>The idea with this is that you draw the samples separately from the distribution for each variable, and then use the Iman &amp; Connover approach to make the samples (as close) to the target correlations as possible. </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload