I think AbouEl-Makarim means bimodal distribution here is my solve
(sorry for primitive example)
m1-0;
sd1-1;
m2-4;
sd2-1;
bimodal-curve(dnorm(x,m1,sd1)+dnorm(x,m2,sd2),
from=min(c(m1,m2))-3*max(c(sd1,sd2)),
to=max(c(m1,m2))+3*max(c(sd1,sd2)));
ql_1-quantile(rnorm(1000,m1,sd1),0.05);
Dear Abou,
I think Your trouble can be solved like there
http://www.talkstats.com/showthread.php/11746-Problem-with-plotting-in-R
---
Zhan Chubukou
Chair of Pathological Physiology magistrant
Gomel State Medical University
Belarus
___
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
Would this work?
m1 - 3.5
m2 - 6.5
s1 - 0.8
s2 - 0.8
dist1 - dnorm(x, mean=m1, sd=s1)
dist2 - dnorm(x, mean=m2, sd=s2)
biModalDist - dist1 + dist2
q - qnorm(.9,0,1)
z1 - q*s1
z2 - q*s2
zLow - m1 - z1
zUp - m2 + z
xShade - seq(zLow, zUp, 0.1)
d1Shade - dnorm(xShade, mean=m1, sd=s1)
d2Shade -
x didn't make it through the cut-and-paste, it should be:
x - seq(0, 10, 0.1)
also zUp has a typo, it should be:
zUp - m2 + z2
That should work now.
On 1/15/2012 2:41 PM, AbouEl-Makarim Aboueissa wrote:
Dear R users:
I am currently teaching a course in Statistics. Can someone give an R
I recently wrote a function for the mosaic package that makes it easy
to generate various kinds of plots of distributions. For example, to
plot a Binom(30,.35) distribution, you just use:
distPlot(binom,params=list(size=30, prob=.35))
and get the attached plot (if it makes it through to
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