[R] Question on "plotCI" function

MacQueen, Don macqueen1 at llnl.gov
Fri Feb 1 16:38:42 CET 2013


You haven't given any "y" values to plotCI.

Try, for example,

plotCI(xx, (lower+upper)/2, ui=upper, (etc)

What you got was in effect
  plot( seq(along=xx), xx )
which is standard behavior for plot() when no "y" values are supplied.

-Don

-- 
Don MacQueen

Lawrence Livermore National Laboratory
7000 East Ave., L-627
Livermore, CA 94550
925-423-1062





On 2/1/13 7:21 AM, "li li" <hannah.hlx at gmail.com> wrote:

>Thanks so much for the reply, Ista. I used "plotrix" library.
>
>Here is my example:
>
>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(xx,ui=upper,li=lower,err="y",pch=NA, xlab="", ylab="", ylim=c(-5,
>5),  slty="solid",scol="blue", lwd=2)
>
>
>My question is how can I change the xllim to be c(0,1) which corresponds
>to
>the "xx" values.
>
>       Hanna
>2013/2/1 Ista Zahn <istazahn at gmail.com>
>
>> There are many plotCI functions in many different packages... which
>> one are you referring to? Also please construct a reproducible example
>> illustrating your problem.
>>
>> Best,
>> Ista
>>
>> On Thu, Jan 31, 2013 at 11:58 PM, li li <hannah.hlx at gmail.com> wrote:
>> > Hi all,
>> >    In my plotCI function, the argument x is chosen to be seq(0.05,
>>0.95,
>> > by=0.05).
>> > However, when I make the plot, the plot has the x coordinate goes
>>1:19.
>> >    Does anyone know how to make the x coordinate to be (0,0.5, 0.1,
>>...,
>> > 0.95).
>> >    Thank you.
>> >       Hanna
>> >
>> >         [[alternative HTML version deleted]]
>> >
>> > ______________________________________________
>> > R-help at 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<http://www.r-project.org/post
>>ing-guide.html>
>> > and provide commented, minimal, self-contained, reproducible code.
>>
>
>	[[alternative HTML version deleted]]
>
>______________________________________________
>R-help at 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.



More information about the R-help mailing list