# showEig: Show the eigenvectors associated with a covariance matrix In matlib: Matrix Functions for Teaching and Learning Linear Algebra and Multivariate Statistics

## Description

This function is designed for illustrating the eigenvectors associated with the covariance matrix for a given bivariate data set. It draws a data ellipse of the data and adds vectors showing the eigenvectors of the covariance matrix.

## Usage

 ```1 2 3``` ```showEig(X, col.vec = "blue", lwd.vec = 3, mult = sqrt(qchisq(levels, 2)), asp = 1, levels = c(0.5, 0.95), plot.points = TRUE, add = !plot.points, ...) ```

## Arguments

 `X` A two-column matrix or data frame `col.vec` color for eigenvectors `lwd.vec` line width for eigenvectors `mult` length multiplier(s) for eigenvectors `asp` aspect ratio of plot, set to `asp=1` by default, and passed to dataEllipse `levels` passed to dataEllipse determining the coverage of the data ellipse(s) `plot.points` logical; should the points be plotted? `add` logical; should this call add to an existing plot? `...` other arguments passed to `link[car]{dataEllipse}`

## Author(s)

Michael Friendly

`link[car]{dataEllipse}`
 ```1 2 3 4 5 6 7 8 9``` ```x <- rnorm(200) y <- .5 * x + .5 * rnorm(200) X <- cbind(x,y) showEig(X) # Duncan data data(Duncan, package="car") showEig(Duncan[, 2:3], levels=0.68) showEig(Duncan[,2:3], levels=0.68, robust=TRUE, add=TRUE, fill=TRUE) ```