Eric Tiger <footballinlsu <at> yahoo.com> writes: > > Hello, > > I got one question on the Latin hypercube sampling. > > suppose > there are three variables a, b, c, all of them follow the normal > distribution. the mean value and standard deviation for each areĀ a(32, > 2), b(35,5), c(37,3). I would like to use Latin hypercube sampling to > random generate 1000 samples. but it needs to satisfy the condition that > a<b<c. > > How can I implement this conditional sampling? >
Inefficient, but perhaps you could just sample a lot more than you need and retain the ones that satisfy your criterion? (That would be efficient in terms of your time, and I can't immediately think of any reason that the result would be biased ...) If all the variables had the same mean you'd need about 8000 points total (since the ordering relationship you have here would apply 1/(2^3) of the time), it should be even easier in your case since the means line up in the order you want. Just a thought. Ben Bolker ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.