[R] Dispersion ( Plot error bars ) help

Ben Bolker bbolker at gmail.com
Tue Oct 26 23:51:02 CEST 2010


Peter Francis <peterfrancis <at> me.com> writes:

> 
> Dear List,
> 
> I am looking to plot error bars on a line using dispersion.
> 
> I have values for the upper value and for the lower values, however
> i am unsure how to plot different values
> for the upper CI and the lower CI?
> 
> I have been using 
> 
> dispersion(1:35,sim,simCI,col="red")
> 

  Take a closer look at the help page.
  The third and fourth arguments of dispersion() are
'ulim' and 'llim'.  By default llim is set equal to ulim,
i.e. by default the confidence intervals are symmetric.
If you have separate widths for the lower and upper CI you
can specify these separately. If your variables represent
the confidence bounds rather than the width of the confidence
interval, set intervals=FALSE (the fifth argument of dispersion).

  good luck
    Ben Bolker



More information about the R-help mailing list