Ellipses                 package:car                 R Documentation

_E_l_l_i_p_s_e_s, _D_a_t_a _E_l_l_i_p_s_e_s, _a_n_d _C_o_n_f_i_d_e_n_c_e _E_l_l_i_p_s_e_s

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

     These functions draw ellipses, including data ellipses, and
     confidence ellipses for linear and generalized linear models.

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


     ellipse(center, shape, radius, center.pch=19, center.cex=1.5, 
       segments=51, add=T, xlab="", ylab="", 
        las=par('las'), col=palette()[2], lwd=2, lty=1, ...)

     data.ellipse(x, y, levels=c(0.5, 0.9), center.pch=19, center.cex=1.5, 
       plot.points=T, add=!plot.points, segments=51, robust=F,
       xlab=deparse(substitute(x)), 
       ylab=deparse(substitute(y)), 
       las=par('las'), col=palette()[2], pch=1, lwd=2, lty=1, ...)

     confidence.ellipse(model, ...)

     confidence.ellipse.lm(model, which.coef, levels=0.95, Scheffe=F, 
       center.pch=19, center.cex=1.5, segments=51, xlab, ylab, 
       las=par('las'), col=palette()[2], lwd=2, lty=1, ...)

     confidence.ellipse.glm(model, which.coef, levels=0.95, Scheffe=F, 
       center.pch=19, center.cex=1.5, segments=51, xlab, ylab, 
       las=par('las'), col=palette()[2], lwd=2, lty=1, ...)

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

  center: 2-element vector with coordinates of center of ellipse.

   shape: 2 * 2 shape (or covariance) matrix.

  radius: radius of circle generating the ellipse.

center.pch: character for plotting ellipse center.

center.cex: relative size of character for plotting ellipse center.

segments: number of line-segments used to draw ellipse.

     add: if `TRUE' add ellipse to current plot.

    xlab: label for horizontal axis.

    ylab: label for vertical axis.

       x: a numeric vector, or (if `y' is missing) a 2-column numeric
          matrix.

       y: a numeric vector, of the same length as `x'.

plot.points: if `FALSE' data ellipses are added to the current
          scatterplot,
 but points are not plotted.

  levels: draw elliptical contours at these (normal) probability or
          confidence levels.

  robust: if `TRUE' use the `cov.trob' function in the `MASS' package
          to calculate the center and covariance matrix for the data
          ellipse.

   model: a model object produced by `lm' or `glm'.

which.coef: 2-element vector giving indices of coefficients to plot; 
          if missing, the first two coefficients (disregarding the
          regression constant)
 will be selected.

 Scheffe: if `TRUE' scale the ellipse so that its projections onto the
          axes give Scheffe confidence intervals for the coefficients.

     las: if `0', ticks labels are drawn parallel to the
 axis; set to
          `1' for horizontal labels (see `par').

     col: color for points and lines; the default is the second entry
          in the current color palette (see `palette'
 and `par').

     pch: plotting character for points; default is `1' 
 (a circle,
          see `par').

     lwd: line width; default is `2' (see `par').

     lty: line type; default is `1', a solid line (see `par').

     ...: other plotting parameters to be passed to `plot' and
 `line'.

_D_e_t_a_i_l_s:

     The ellipse is computed by suitably transforming a unit circle.

     `data.ellipse' superimposes the normal-probability contours over a
     scatterplot
 of the data.

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

     `NULL'. These functions are used for their side effect: producing
     plots.

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

     Georges Monette Georges.Monette@mathstat.YorkU.CA 
 and John Fox
     jfox@mcmaster.ca

_R_e_f_e_r_e_n_c_e_s:

     Fox, J. (1997)
 Applied Regression, Linear Models, and Related
     Methods. Sage.

     Monette, G. (1990)
 Geometry of multiple regression and 3D
     graphics.
 In Fox, J. and Long, J. S. (Eds.) 
 Modern Methods of
     Data Analysis. Sage.

_S_e_e _A_l_s_o:

     `cov.trob'.

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


     data(Prestige)
     attach(Prestige)
     data.ellipse(income, education, levels=0.1*1:9, lty=2)
     confidence.ellipse(lm(prestige~income+education), Scheffe=T)

