Latin hypercube sampling r
- #Latin hypercube sampling r how to
- #Latin hypercube sampling r software
- #Latin hypercube sampling r code
These papers discuss Latin hypercube sampling: Owen (199?) Annals of Statistics, to appear "Lattice Sampling Revisited: Monte Carlo Variance of Means Over Randomized Orthogonal Arrays"
#Latin hypercube sampling r software
These papers discuss randomized orthogonal arrays, the second is being revised in parallel with development of the software described here:Ī.B. This book provides a large list of orthogonal array constructions:Īloke Dey (1985) "Orthogonal Fractional Factorial Designs" Halstead Press Bush (1952) Annals of Mathematical Statistics, Vol 23 pp 508-524. Bush (1952) Annals of Mathematical Statistics, Vol 23 pp 426-434 Kempthorne (1961) Annals of Mathematical Statistics, Vol 32 pp 1167-1176. Here are the references for the constructions used: When a very large number of runs is possible a Bush design may work well, since it can have high strength. Obviously this advice depends on the sort of problems I expect to handle. Then I would consider either an Addelman- Kempthorne or Bose-Bush design to see whether it could accommodate the desired number of columns with fewer runs. In practical use, I would try first to use a Bose design. Passing the q n k on the command line is more difficult than letting the computer figure them out, but it allows more error checking. If you only want 4 columns the former saves a lot of time. For example bose 101 4 only generates the first 4 columns of the array, whereas bose 101 generates 102 columns. It is faster to generate only the columns you need.
#Latin hypercube sampling r how to
To add GF(p^r) for some new prime power p^r, consult Alanen and Knuth for instructions on how to search for an appropriate indexing polynomial, and for how to translate that polynomial into a replacement rule for x^r. In any event there are some large primes and prime powers in the program if an enormous array is needed. Therefore the missing prime powers are only needed in certain enormous arrays, not in the small ones of most practical use. The smallest strength 2 array with 2809 symbols has 2809^2 = 7890481 rows. The smallest prime power not covered is 53^2 = 2809.
Unable to allocate 1927'th row in an integer matrix.For example, with a large prime like 10663, the program knows the Galois field, but can't allocate enough memory: Note that some of these will require more memory than your computer has. Keep in mind that a strength 2 array on 101 levels requires 101^2 = 10201 experimental runs, so it is only useful where large experiments are possible. An array with 101 levels is useful for exploring a function at levels 0.00 0.01 through 1.00. The first row are small primes, the second row are primes that are 1 more than a "round number". Here are some of the smaller prime powers: They presently work for the following prime powers:Īll Primes All prime powers q = p^r where p < 50 and q < 10^9 The designs given here require a prime power for the number of levels. This is more a test of the accuracy of my transcription than of the original tables. The resulting fields have been tested by the methods described in Appendix 2 of that paper and they passed. The Galois field arithmetic for the prime powers is based on tables published by Knuth and Alanen (1964) below. That is q = p^r where p is prime and r >= 1 is an integer. Because of this the number of levels q must be a prime power. The constructions used are based on published algorithms that exploit properties of Galois fields. The programs below provide some choices to pick from, hopefully without too much of a compromise. It is entirely possible that no array of strength t > 1 is compatible with these conditions. One may also have a maximum value of n in mind and a minimum value for the number q of distinct levels to investigate. The notation for such an array is OA( n, k, q, t ).
There would be lambda "overstrikes" at each point of the grid.
Geometrically, if one were to "plot" the submatrix with one plotting axis for each of the t columns and one point in t dimensional space for each row, the result would be a grid of q^t distinct points. This number is the index of the array, commonly denoted lambda. The array has strength t if, in every n by t submatrix, the q^t possible distinct rows, all appear the same number of times. for many helpful electronic discussions that lead to improvements in these programs.Īn orthogonal array A is a matrix of n rows, k columns with every element being one of q symbols 0.,q-1. I thank the Semiconductor Research Corporation and the National Science Foundation for supporting this work.
#Latin hypercube sampling r code
This code comes with no warranty of any kind. From: programs construct and manipulate orthogonal arrays.