Re: [R] Latin hypercube sampling from a non-uniform distribution

2017-08-10 Thread S Ellison
> I think that I need to > draw a Hypercube sample for each age class (i.e., for 0, 1, 2, 3, 4, 5, 6, 7) > in a > given simulation (i.e., N = 1) and the LHS values for all age classes should > be > like the observed cumulative distribution (see attached figure). > output of randomLHS should be a

Re: [R] Latin hypercube sampling from a non-uniform distribution

2017-08-08 Thread Marine Regis
Thanks for your answer. I have attached the plot for representing the variable. I think that I need to draw a Hypercube sample for each age class (i.e., for 0, 1, 2, 3, 4, 5, 6, 7) in a given simulation (i.e., N = 1) and the LHS values for all age classes should be like the observed cumulative

Re: [R] Latin hypercube sampling from a non-uniform distribution

2017-08-08 Thread S Ellison
> However, my variable is simulated from the cumulative distribution function > of the Poisson distribution. Then I am afraid I don't know what you're trying to achieve. Or why. However, the principle holds; write a function that maps [0,1] to the 'pattern' you want, do that and apply it to the

Re: [R] Latin hypercube sampling from a non-uniform distribution

2017-08-07 Thread Marine Regis
Thanks for your answer. However, my variable is simulated from the cumulative distribution function of the Poisson distribution. So, the pattern obtained from the function "qpois" is not the same as the observed pattern (i.e., obtained from the function "ppois") set.seed(5) mortality_probabili

Re: [R] Latin hypercube sampling from a non-uniform distribution

2017-08-07 Thread S Ellison
> How can I draw a Hypercube sample for the variable mortality_probability so > that this variable exhibits the same pattern as the observed distribution? One simple way is to use the uniform random output of randomLHS as input to the quantile function for your desired distribution(s). For exa

[R] Latin hypercube sampling from a non-uniform distribution

2017-08-04 Thread Marine Regis
Hello, I am performing a sensitivity analysis using a Latin Hypercube sampling. However, I have difficulty to draw a Hypercube sample for one variable. I�ve generated this variable from a Poisson distribution as follows: set.seed(5) mortality_probability <- round(ppois(seq(0, 7, by = 1), lambda