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 function. 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, Aimee. ______________________________________________ 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.