Re: [R] Bimodal Distribution

From: Andrew Robinson <A.Robinson_at_ms.unimelb.edu.au>
Date: Fri, 30 May 2008 09:53:16 +1000

Hi Mike,

if you can decompose the bimodal distribution into (eg two) known forms, then you could try a stepwise approach, eg:

If uniform < 0.5 then double it and use it to draw from the inverse cdf of A,

else, double (uniform - 0.5) and use it to draw from the inverse cdf of B.

You can change the cutoff and the weights to suit your need. It's best to double-check by plotting an empirical density of the numbers generated.

I hope that this helps,

Andrew

On Thu, May 29, 2008 at 04:05:29PM -0600, Mike Williams wrote:
> Hello R Users,
>
> I am doing a Latin Hypercube type simulation. I have found the
> improvedLHS function and have used it to generate a bunch of properly
> distributed uniform probabilities. Now I am using functions like qlnorm
> to transform that into the appropriately lognormal or triangularly
> distributed parameters for my modes. However I have a parameter which I
> believe is bimodally distributed, could someone please point me at an
> appropriate function equivalent to qlnorm which I can use, because for
> some reason I have been unable to find one. It occurs to me that maybe
> one doesn't exist, in which case could someone give me some other idea
> of how to accomplish this goal?
>
> Thanks,
>
> Mike
>
> ______________________________________________
> R-help_at_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.

-- 
Andrew Robinson  
Department of Mathematics and Statistics            Tel: +61-3-8344-6410
University of Melbourne, VIC 3010 Australia         Fax: +61-3-8344-4599
http://www.ms.unimelb.edu.au/~andrewpr
http://blogs.mbs.edu/fishing-in-the-bay/

______________________________________________
R-help_at_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.
Received on Fri 30 May 2008 - 00:14:35 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 30 May 2008 - 00:30:42 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive