Hello all,

I am trying to do a Latin Hypercube Sampling (LHS) to a 5-parameter
design matrix. I start as follows:

library(lhs)

p1<-randomLHS(1000, 5)

If I check the distribution of each parameter (column), they are
perfectly uniformly distributed (as expected).For example,

hist(p1[,1])

Now the hard (maybe strange) question. I want the combination of the
first three parameters to sum up to 1 (which obviously do not)

s<-p1[,1]+p1[,2]+p1[,3]

s==1

It occurred to me to divide each of these parameters with the sum
(vector "s" above). However the uniform distribution is lost (example
for parameter 1 - first column):

par1.transf<-p1[,1]/s

hist(par1.transf)


So, is there a way to maintain the random LHS (with uniformly
distributed parameters) so that the refered condition is fulfilled?

Any suggestions would be much welcome.

Thanks,

Duarte

______________________________________________
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.

Reply via email to