Description Usage Arguments Details Value References
Corrects the correlation matrix of a given Latin Hypercube Sample.
1 2 | LHScorcorr(vars, COR = 0, method = c("Pearson", "Spearman"), eps = 0.005,
echo = FALSE, maxIt = 0)
|
vars |
The data.frame or matrix containing the parameters from the "raw" Latin Hypercube Sample. Each column corresponds to one variable, and each line to one observation. |
COR |
The desired correlation matrix. The default is to have 0 correlation. You can supply a numeric square matrix with M rows, where M is the number of input factors. The *lower* triangular part of the matrix will be used as the desired correlation matrix. |
method |
A character string, which may be "Spearman" or "Pearson", indicating the correlation method to be used. |
eps |
The tolerance for the deviation between the prescribed correlation matrix and the result. |
echo |
Set to true to display information messages. |
maxIt |
Maximum number of iterations before giving up. Set to 0 to use a heuristic based on the size of the hypercube. Set to a negative number to never give up. *CAUTION*, this might result in an infinite loop. |
This function changes the order in which data is organized in order to force the correlation matrix to a prescribed value. This implementation uses the Hungtington-Lyrintzis algorithm.
This is mainly intended for use inside of the LHS
function.
If you intend to use non-zero correlation terms, read Chalom & Prado (2012) for some important theoretical restrictions.
The correlation matrix may be specified by a Pearson or Spearman method. In order to
generate the Spearman correlation, the function "rank transforms" the data using the
order
function, and thus works only if there are no ties in the data.
A data.frame containing the same variables, but with the correlation matrix corrected.
Huntington, D.E. and Lyrintzis, C.S. 1998 Improvements to and limitations of Latin hypercube sampling. Prob. Engng. Mech. 13(4): 245-253.
Chalom, A. and Prado, P.I.K.L. 2012. Parameter space exploration of ecological models arXiv:1210.6278 [q-bio.QM]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.