ellipse               package:mixtools               R Documentation

_D_r_a_w _T_w_o-_D_i_m_e_n_s_i_o_n_a_l _E_l_l_i_p_s_e _B_a_s_e_d _o_n _M_e_a_n _a_n_d _C_o_v_a_r_i_a_n_c_e

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

     Draw a two-dimensional ellipse that traces a bivariate normal
     density contour for a given mean vector, covariance matrix, and
     probability content.

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

     ellipse(mu, sigma, alpha = .05, npoints = 250, newplot = FALSE,
             draw = TRUE, ...)

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

      mu: A 2-vector giving the mean.

   sigma: A 2x2 matrix giving the covariance matrix.

   alpha: Probability to be excluded from the ellipse. The default
          value is alpha = .05, which results in a 95% ellipse.

 npoints: Number of points comprising the border of the ellipse.

 newplot: If newplot = TRUE and draw = TRUE, plot the ellipse on a new
          plot.  If newplot = FALSE and draw = TRUE, add the ellipse to
          an existing plot.

    draw: If TRUE, draw the ellipse.

     ...: Graphical parameters passed to 'lines' or 'plot' command.

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

     'ellipse' returns an 'npoints'x2 matrix of the points forming the
     border of the ellipse.

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

     Johnson, R. A. and Wichern, D. W. (2002) _Applied Multivariate
     Statistical Analysis, Fifth Edition_, Prentice Hall.

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

     'regcr'

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

     ## Produce a 95% ellipse with the specified mean and covariance structure. 

     mu<-c(1, 3)
     sigma<-matrix(c(1, .3, .3, 1.5), 2, 2)

     ellipse(mu, sigma, npoints = 200, newplot = TRUE)
      

