Description Usage Arguments Value Note Author(s) See Also Examples
Creates a Latin Hypercube Sample (LHS) of the specified distribution.
1 |
distr |
The function for generating random sample or its name. If distr is "rdist", the function "qdist" must be the quantile function of this distribution with argument p as a vector of probabilities, as all univariates distributions of the stat library. |
nsv |
The number of raws of the final matrix. |
nsu |
The number of columns of the final matrix |
nvariates |
The number of variates |
... |
All arguments to be passed to distr except the size of the sample. |
A nsv x nsu matrix of random variates.
The resulting lhs is in fact a latin hypersquare sampling: the lhs is provided only in the first 2 dimensions.
It is not possible to send truncated distribution with
rtrunc
. Use mcstoc
for this purpose, with
lhs=TRUE and rtrunc=TRUE.
The ... arguments will be recycled.
adapted from a code of Rob Carnell (library lhs)
1 |
Loading required package: mvtnorm
Attaching package: 'mc2d'
The following objects are masked from 'package:base':
pmax, pmin
[1] 7 9 8 6 3 2 4 5 10 1 9 7 1 4 8 6 10 5 2 3 6 5 10 3 4
[26] 8 1 9 7 2 1 4 2 9 7 8 10 6 5 3 10 3 2 9 1 5 4 7 6 8
[51] 5 1 10 8 4 3 9 6 7 2 6 7 10 2 3 4 1 8 9 5 8 2 10 5 4
[76] 9 7 1 3 6 4 7 8 2 9 10 6 3 5 1 2 10 4 8 3 6 5 7 9 1
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.