Description Usage Arguments Details Author(s) See Also Examples
polygon.conint
graphs both the upper and lower end-point functions of a confidence interval as a standard polygon on a plot.
1 | polygon.conint(x, ...)
|
x |
object of class |
... |
further arguments to |
This is intended for plotting confidence intervals produced by the output of simconboot
or rconint
.
Wesley Graybill, Mingli Chen, Victor Chernozhukov, Ivan Fernandez-Val, Alfred Galichon
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ## Not run: data(GrowthChart)
attach(GrowthChart)
nage <- 2 * pi * (age - min(age)) / (max(age) - min(age))
formula <- height~I(sin(nage))+I(cos(nage))+I(sin(2*nage))+I(cos(2*nage))+
I(sin(3*nage))+I(cos(3*nage))+I(sin(4*nage))+I(cos(4*nage))
j<-simconboot(nage,height,lm,formula)
plot(nage,height,pch=21,bg='gray',cex=0.5,xlab="Age (years)",
ylab="Height (cms)",col='gray',xaxt='n')
axis(1, at = seq(-2*pi*min(age)/(max(age)-min(age)),
2*pi+1,by=5*2*pi/(max(age)-min(age))), label = seq(0, max(age)+1, by=5))
polygon.conint(j, border=NA, col='darkgray')
detach(GrowthChart)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.