[R] latin hypercube sampling

Aimee Kopolow alj27 at georgetown.edu
Tue Feb 19 08:16:37 CET 2013

Hi all,

I am attempting to use latin hypercube sampling to sample different
variable functions in a series of simultaneous differential equations.
There is very little code online about lhs or clhs, so from different
other help threads I have seen, it seems I need to create a
probability density function for each variable function, and then use
latin hypercube sampling on this pdf.

So far, I have created a data frame consisting of the "y" output of
density(functionX) for each of the different functions I wish to
sample. [examples of functions include T1(t), WL1(T1,t),
BE1(WL1,T1,t)] The dataframe consists of 512 rows/vectors for each

I tried running
res <- clhs(df, size = 500, iter = 2000, progress = FALSE, simple = TRUE)

and it returned a single series of 500 samples, rather than a series
of 500 samples per function.

I ultimately need a sample of each variable function that I can run
through my model, putting each individual variable function as a
constant instead, and then performing PRCC. Is there anyone who can
advise on how to do this, or failing that, where I should look for
sample code?

Thank you for any help you are able to give,

More information about the R-help mailing list