Skip to content
Prev 316706 / 398503 Next

Question on "plotCI" function

On 02/02/2013 02:21 AM, li li wrote:
Hi Hanna,
You are getting what you request in the example. xx is interpreted as 
the "y" values and the "x" values default to the number of "y" values 
(1:19). Perhaps what you want is something like this:

x<-seq(0.05,0.95,by=0.05)
xx<-seq(0.05,0.95,by=0.05)
lower<-c(-2.896865,-2.728416,-2.642574,-2.587724,-2.548672,-2.518994,
  -2.495409,-2.476031,-2.459662,-2.445513,-2.433014,-2.421739,-2.411344,
  -2.401536, -2.392040, -2.382571, -2.372786, -2.362198, -2.349891)
upper<-c(2.311539,2.372006,2.423280,2.469220,2.511851,2.552421,
  2.591797, 2.630657, 2.669579, 2.709135, 2.749928, 2.792670, 2.838268,
  2.887976, 2.943683, 3.008502, 3.088240, 3.195954, 3.373528)
library(plotrix)
plotCI(x,xx,ui=upper,li=lower,err="y",pch=NA,xlab="",ylab="",
  slty="solid",scol="blue",lwd=2)

Jim