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

S Ellison S.Ellison at LGCGroup.com
Thu Aug 10 13:29:34 CEST 2017


> 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 matrix with 100 rows (N = 100 simulations)
> and 7 columns (7 age classes) containing LHS values and each row should
> exhibit the same pattern as the observed cumulative distribution.

If you want each row to hold _different_ cumulative probabilities drawn at random from something, but broadly following your chosen non-random pattern, it sounds like you will need to decide what joint distribution you want to draw those probabilities from so that the cumulative 'probability' is strictly monotonic. You might then be able to work out how to map the multivariate [0,1] output of randomLHS to generate the relevant points. It's possible that a simple kludge applied row-wise to [0,1] values might work, but a) I can't think of one quickly and b) I'd have a hard time defending it if I did.

It sounds like you need to find a nearby statistician and explain what you are trying to achieve. They should be able to tell you either how to get there or, perhaps, why it's not sensible to start and what to do instead.  

Sorry I can't help further

S.


*******************************************************************
This email and any attachments are confidential. Any use...{{dropped:8}}



More information about the R-help mailing list