[R-sig-teaching] Example(s) of Biomodal distributions

Randall Pruim rpruim at calvin.edu
Mon Jan 16 14:58:58 CET 2012


Just noticing that I read the post below too quickly and thought it  
said "binomial" rather than "bimodal".  But my solution works all the  
same, you just need to provide a bimodal distribution as the first  
argument.  The only requirement is that if the name of your  
distribution is "foo", then dfoo, pfoo, and qfoo need to exist and do  
the correct things.  They may be user defined functions.

You can of course, use the groups argument however you like to define  
the tails of the distribution.  For example, something like

	groups = ( x < qfoo(0.05, ....) | x > qfoo(0.95) )

should shade the tails differently from the center.

In view of the email from Jeff Laux, I might consider adding some  
utilities to build new dfoo, pfoo, and qfoo functions from existing  
ones, at least for a few easy cases, like linear combinations.  That  
would make it really easy to generate various bimodal distributions.

---rjp




On Jan 15, 2012, at 2:41 PM, AbouEl-Makarim Aboueissa wrote:

> Dear R users:
>
> I am currently teaching a course in Statistics. Can someone give an  
> R code(s) to create a biomodal curve(s) with shaded area of 90% and  
> with 5% in each tail
>
> With many thanks
> abou
>
>
>
> ==========================
> AbouEl-Makarim Aboueissa, Ph.D.
> Associate Professor of Statistics
> Graduate Program Coordinator
> Department of Mathematics & Statistics
> University of Southern Maine
> 96 Falmouth Street
> P.O. Box 9300
> Portland, ME 04104-9300
> USA
>
>
> Tel: (207) 228-8389
> Fax: (207) 780-5607
> Email: aaboueissa at usm.maine.edu
>          aboueiss at yahoo.com
>
> Office: 301C Payson Smith
>
>
> 	[[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-teaching at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-teaching



More information about the R-sig-teaching mailing list