T2: Generates a Hotelling's T2 Graph

Description Usage Arguments Details Value Author(s) References Examples

View source: R/T2.R

Description

Generates a Hotelling's T2 Graph both mvdareg and mvdapca objects.

Usage

1
T2(object, ncomp = object$ncomp, phase = 1, conf = c(.95, .99), verbose = FALSE)

Arguments

object

an object of class mvdareg or mvdapca.

ncomp

the number of components to include in the calculation of Hotelling's T2.

phase

designates whether the confidence limits should reflect the current data frame, phase = 1 or future observations, phase = 2.

conf

the confidence level(s) to use for upper control limit.

verbose

output results as a data frame

Details

T2 is used to generates a Hotelling's T2 graph both PLS and PCA models.

Value

The output of T2 is a graph of Hotelling's T2 and a data frame listing the T2 values.

Author(s)

Nelson Lee Afanador (nelson.afanador@mvdalab.com)

References

Hotelling, H. (1931). "The generalization of Student's ratio". Annals of Mathematical Statistics 2 (3): 360:378.

Examples

1
2
3
4
5
6
data(Penta)
## Number of bootstraps set to 300 to demonstrate flexibility
## Use a minimum of 1000 (default) for results that support bootstraping
mod1 <- plsFit(log.RAI ~., scale = TRUE, data = Penta[, -1],
               ncomp = 2, validation = "oob", boots = 300)
T2(mod1, ncomp = 2)

mvdalab documentation built on May 20, 2017, 12:42 a.m.

Search within the mvdalab package
Search all R packages, documentation and source code