[R] How to shadow 'power' area?
andrej.kastrin at siol.net
Mon Jun 25 22:50:59 CEST 2007
Suppose I plot two normal distributions (A and B) side by side and add
vertical line which hipotheticaly represent alpha value; e.g.:
x <- seq(-3.5,5, length=1000)
y <- dnorm(x)
# Plot distribution A
# Plot distribution B
y2 <- dnorm(x-1.5)
# Plot vertical line for alpha value
Now I want to shadow area labeled as "Power". Any suggestion how to do
that using 'polygon' function?
Thanks in advance for any suggestion.
More information about the R-help