Skip to content
Prev 387779 / 398502 Next

LHS random number generator

Hi Shah,
I think what you are struggling toward is this:

prior_lhs <- list(r_mu=c( 0.00299, 0.0032),
                  r_sd=c( 0.001, 0.002),
                  lmp=c( 0.40, 0.43),
                  gr_mu=c( 0.14, 0.16),
                  gr_s=c( 0.01, 0.020),
                  alpha1=c( 0.0001, 0.0018),
                  alpha2=c(0.0017, 0.0028),
                  alpha3=c( 0.005, 0.009),
                  beta=c(0.69, 0.75))
for(i in 1:length(prior_lhs))
 prior_lhs[[i]]<-seq(prior_lhs[[i]][1],prior_lhs[[i]][2],length.out=4)

This gives you the "quartiles" you need for randomLHS function in the
"lhs" package if I read the help page correctly.

Jim
On Mon, Apr 12, 2021 at 10:21 PM Shah Alam <dr.alamsolangi at gmail.com> wrote: