Erin Hodgess wrote:
Hi R People:
If I have a fitted values from a model, how do I plot the
(1-alpha)100% confidence intervals along with the fitted values,
please?
Also, if the intervals are "shaded" gray, that would be nice too, please?
I check confint, but that doesn't seem to do what I want.
Hi Erin,
Probably the simplest way is to plot points with "error bars" as in the
following example:
coefficients<-rnorm(5)+4
plot(coefficients,main="Coefficient
plot",xaxt="n",ylim=c(0,6),xlab="Coefficients")
axis(1,at=1:5,labels=paste("Coef",1:5,sep=""))
dispersion(1:5,coefficients,abs(rnorm(5)),col="lightgray")
The dispersion function in the plotrix package is just one way to
illustrate confidence intervals.
Jim
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.