T2conf.ellipse: (1 - alpha)*100% Confidence Ellipses

Description Usage Arguments Value Examples

View source: R/T2conf.ellipse.R

Description

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

Usage

1
T2conf.ellipse(data, alpha = 0.05, col1 = 1, col2 = 2)

Arguments

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

Value

g a ggplot2 object with a drawing of the confidence ellipse (solid) with the T^2 intervals drawn on with dashed lines

Examples

1
2
testData <- datasets::mtcars[, 1:2]
T2conf.ellipse(testData, 0.05)

leahpom/MATH5793POMERANTZ documentation built on May 10, 2021, 9:52 a.m.