I have modified the distPlot() function in the mosaic package so that
the following makes the desired plot (as a density histogram):
distPlot( "binom", params=list(35,.25), groups= y <
dbinom(qbinom(0.05, 35, .25), 35,.25), kind='hist')
The groups argument is used to get the desired shading of tail
probabilities. (Technically, it is not shading 5% in each tail, but
it is doing one of the reasonable approximations to that).
I expect this feature will show up on github sometime Monday (along
with some other updates scheduled for release) and on CRAN in the near
future.
If you are really anxious, you can get it from my personal repository
using
install.packages('mosaic', repos='http://www.calvin.edu/~rpruim/R',
type='source')
Since images don't go through on the mailing list, I've placed a few
here:
http://www.calvin.edu/~rpruim/R/distPlot.pdf
---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: [email protected]
> [email protected]
>
> Office: 301C Payson Smith
>
>
> [[alternative HTML version deleted]]
>
> _______________________________________________
> [email protected] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-teaching
[[alternative HTML version deleted]]
_______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-teaching