hotellingsttest: hotellingsttest

Description Usage Arguments Details Value List of outputs includes The plot Examples

View source: R/hotellingsttest.R

Description

This function performs calculations and makes a plot for a bivariate dataset based on Hotelling's T test

Usage

1
hotellingsttest(data, mu, alpha)

Arguments

data

the data set to conduct the test on

mu

the estimated mean vector

alpha

the confidence level for the T test

Details

User inputs a bivariate dataset, estimate for the mu vector, and alpha value corresponding to the desired confidence level and gets the outcome of the test, information about the data provided, and a plot of the confidence ellipse

Value

List output of calculations from Hotelling's T Test and a plot of the confidence ellipse plot

List of outputs includes

- Outcome of the test - The calculated quadratic size - The scaled quantile - The eigenvectors of the variance covariance matrix - The eigenvalues of the variance covariance matrix - The half major and minor axis lengths of the confidence ellipse - The ratio of the major and minor axes in for the confidence ellipse

The plot

The plot shows the confidence ellipse with lines marking the mean values and the axes of the ellipse

Examples

1
## Not run:  hotellingsttest(data = matrix(c(49,51,73,85,33,26),nrow=3,ncol=2),mu = matrix(c(1,2),nrow=2,ncol=1),alpha=0.05)

jacob-moser/MATH4793MOSER documentation built on Dec. 20, 2021, 8:07 p.m.