<p>Package author here :)</p>

<p>That is certainly a mistake on our part, the user <em>SHOULD</em> be able to set <code>maxIt</code> explicitly and it solves the problem in your case. I'll try to release a new version soon with the fix. (<strong>Update</strong>: pse 0.4.5 submitted to CRAN. Should be online soon)</p>

<p>However, it is important to note that there is another problem that might happen in cases such as this. The problem is that it may be impossible to generate samples from a multivariate distribution with fixed parameters and correlation matrix. In some situations, all correlation matrices are admissible (for instance, if all your <code>q</code> distributions are <code>qnorm</code>, you can specify the correlation terms freely). However, more complicated distributions sometimes do not allow for a free specification of correlation terms. This is the case, for your data, in the <code>qweibull</code> and <code>qlogis</code> distributions. So it might happen that the program will not converge, no matter how large <code>maxIt</code> is set.</p>

<p>We wrote a small section about this problem here: <a href="http://arxiv.org/abs/1210.6278" rel="nofollow">http://arxiv.org/abs/1210.6278</a></p>

<p>A better (but maybe denser) mathematical background can be found here: <a href="http://arxiv.org/abs/1010.6118" rel="nofollow">http://arxiv.org/abs/1010.6118</a></p>
Sensitivity analysis with correlated predictors: Package pse LHS() with correlation structure does not converge
<p>I noticed that function <code>LHS()</code> in package <strong>pse</strong> provides the argument <code>opts = list()</code> which accepts two arguments: <code>COR</code> and <code>eps</code>, the former being a correlation matrix and the latter the tolerance for the deviation between the prescribed correlation matrix and the result. Both feed down into a function called <code>LHScorcorr()</code> </p>

<p>I can run the function successfully for a high <code>eps</code> (e.g. 0.5, 1), however the default is 0.005. At low values of <code>eps</code> (&lt; 0.1 or so) the function does not converge (see error message at bottom). </p>

<p>I would like to allow it to converge at lower values, and looking at <code>LHScorcorr.R</code> it does take a <code>maxIt</code> argument (maximum iterations). It is set to <code>maxIt = 2*sqrt(dim(vars)[1])</code>, however, unlike eps, cannot seemingly be fed into LHS(). According to <code>?LHS</code>, it also doesn't take <code>...</code> arguments.</p>

<p>1) Am I missing something or is there really no way of feeding a maxIt into the function call? 2) Is that even the cause of the problem I am encountering? 3) What are the "acceptable" ranges of eps to feed?</p>

<p>Here is a subset 'subdf' of my real-data data frame (I've tested my code on it):
<a href="https://drive.google.com/file/d/0BwjVzXSG-JMJX2lZSG44TjNjb28/view?usp=sharing" rel="nofollow">https://drive.google.com/file/d/0BwjVzXSG-JMJX2lZSG44TjNjb28/view?usp=sharing</a></p>

<p>And here is the function I have (currently still poorly commented since it is a modified version of one which takes more options): <a href="https://github.com/ewiik/flux/blob/master/functions/gasExchangeSensitivity.R" rel="nofollow">https://github.com/ewiik/flux/blob/master/functions/gasExchangeSensitivity.R</a></p>

<p>This is what I run:</p>

<pre><code>datacorr &lt;- cor(subdf, method = "spearman",use = "complete.obs")

factors &lt;- c("Temperature", "Conductivity", "pH", "meanWindMS", "SalCalc", "TICumol", 
             "Pressure", "pco2atm")

distro &lt;- c("qweibull", "qnorm", "qlogis", "qnorm", "qweibull", "qnorm", "qnorm", "qunif") 

props &lt;- list( list(shape=4.02, scale=18.65), list(mean=1013, sd=499), 
               list(location=8.84,scale=0.31), list(mean=4.98, sd=0.83),
               list(shape=2.13, scale=0.68), list(mean=3821, sd=1068),
               list(mean=94.6, sd=0.17), list(min=356.9, max=402.2))


latincorr &lt;- LHS(gasExchangeSens, factors = factors, N = 200, q = distro, q.arg = props, 
                 nboot = 200, opts = list(COR = datacorr, eps = 0.1))
</code></pre>

<p><code>latincorr &lt;-</code> at the above eps setting gives:</p>

<pre><code>In internal.LHScorcorr(vars, COR, l = l, eps = eps, it = it + 1,  :
  LHScorcorr: correlation does not converge after maximum iterations
</code></pre>