plotCI                package:sfsmisc                R Documentation

_P_l_o_t _C_o_n_f_i_d_e_n_c_e _I_n_t_e_r_v_a_l_s / _E_r_r_o_r _B_a_r_s

_D_e_s_c_r_i_p_t_i_o_n:

     THIS IS NOW (2004-08-12) DEPRECATED !!!

     DO USE  'plotCI' from package 'gplots' INSTEAD!

     Given a set of x and y values and upper and lower bounds, this
     function plots the points with error bars.  Can be used for
     confidence interval visualization as well.

_U_s_a_g_e:

     plotCI(x, y = NULL, uiw, liw = uiw, aui = NULL, ali = aui,
            err = "y", xlim = NULL, ylim = NULL, type = "p", log = "",
            sfrac = 0.01, gap = 0, add = FALSE,
            col = par("col"), lwd = par("lwd"), slty = par("lty"),
            scol = col, pt.bg = NA,
            xlab = NULL, ylab = NULL, main = "", axes = TRUE, ...)

_A_r_g_u_m_e_n_t_s:

       x: the x coordinates of points in the plot

       y: the y coordinates of points in the plot

     uiw: the width of the upper portion of the confidence region, or
          (if 'liw' is missing) the width of both halves of the
          confidence region

     liw: the width of the lower portion of the confidence region (if
          missing, the function assumes symmetric confidence bounds)

     aui: the absolute upper limit of the confidence region

     ali: the absolute lower limit of the confidence region

     err: character giving the direction of error bars: '"x"' for
          horizontal, '"y"' for vertical ('"xy"' would be nice but is
          not implemented yet).

    xlim: x limits of the plot

    ylim: y limits of the plot

    type: point/line type; passed to 'points'

     log: character indicating if log scales should be use in x or y;
          passed to 'plot.default()'.

     gap: size of gap in error bars around points (default 0)

   sfrac: scaling factor for the size of the 'serifs' (end bars) on the
          confidence bars, in x-axis units

     add: logical; if FALSE (default), create a new plot; if TRUE, add
          error bars to an existing plot.

     col: color of points

     lwd: line width of error bars

    slty: line type of error bars

    scol: color of error bars

   pt.bg: background color of points (use 'pch=21, pt.bg=par("bg")' to
          get open points superimposed on error bars).

xlab, ylab: horizontal and vertical axis labels.

    main: main title, see 'plot.default' or 'title'.

    axes: logical indicating if axes should drawn, see 'plot.default'.

     ...: any other parameters to be passed through to 'plot'.

_V_a_l_u_e:

     None.

_T_O _D_O:

     Fixes for logarithmic axes; simultaneous horizontal and vertical
     error bars.  The main problem is figuring how parameters should be
     specified.

_N_o_t_e:

     The package 'gregmisc' has been containing another extension of
     Ben's original posting with the same name 'plotCI'.  We should
     really merging the two versions into Greg's one, i.e., eventually
     deprecate this version (of package 'sfsmisc').

_A_u_t_h_o_r(_s):

     Ben Bolker bolker@zoo.ufl.edu (documentation and tweaking of a
     function provided by Bill Venables)

_E_x_a_m_p_l_e_s:

       y <- runif(10)
       err <- runif(10)
       plotCI(1:10,y,err)
       plotCI(1:10,y,err,2*err,lwd=2,col="red")
       err.x <- runif(10)
       err.y <- runif(10)
       plotCI(1:10,y,err.y,pt.bg=par("bg"),pch=21)
       plotCI(1:10,y,err.x,pt.bg=par("bg"),pch=21,err="x",add=TRUE)

