Description Usage Arguments Value Examples
View source: R/T2conf.ellipse.R
I used Figures 5.1 and 5.2 o pages 23 and 227, respectively, of our book, Applied Multivariate Statistical Analysis, 6th Edition, by Johnson and Wichern, to create the confidence ellipse. This is similar to the funciton I made called conf.ellipse, but this one only outputs the graph, it outputs it as an object (so I can use it in my Shiny app), and it adds the dashed lines
1  | T2conf.ellipse(data, alpha = 0.05, col1 = 1, col2 = 2)
 | 
data | 
 a two-vector data.frame  | 
alpha | 
 the significance level, set to the default of 0.05  | 
col1 | 
 an integer saying which is the first column the user would like to look at  | 
col2 | 
 an integer saying which is the second column the user would like to look at  | 
g a ggplot2 object with a drawing of the confidence ellipse (solid) with the T^2 intervals drawn on with dashed lines
1 2  | testData <- datasets::mtcars[, 1:2]
T2conf.ellipse(testData, 0.05)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.