Type: | Package |
Title: | Multivariate Tests for the Vector of Means |
Version: | 3.2.1 |
Author: | Henrique Jose de Paula Alves [aut, cre], Ben Deivide de Oliveira Batista [ctb], Daniel Furtado Ferreira [aut] |
Maintainer: | Henrique Jose de Paula Alves <jpahenrique@gmail.com> |
Description: | This is a statistical tool interactive that provides multivariate statistical tests that are more powerful than traditional Hotelling T2 test and LRT (likelihood ratio test) for the vector of normal mean populations with and without contamination and non-normal populations (Henrique J. P. Alves & Daniel F. Ferreira (2019) <doi:10.1080/03610918.2019.1693596>). |
Depends: | R (≥ 3.1.0) |
Imports: | tcltk, ggplot2, robustbase, tcltk2, gridExtra, stats, utils, MASS, grDevices, DescToolsAddIns |
Suggests: | tkrplot |
License: | GPL-2 |
Encoding: | UTF-8 |
LazyData: | TRUE |
RoxygenNote: | 7.1.1 |
NeedsCompilation: | no |
Packaged: | 2020-12-14 19:05:11 UTC; Henrique |
Repository: | CRAN |
Date/Publication: | 2020-12-14 19:50:02 UTC |
The likelihood ratio parametric bootstrap with trace test (TLRPBT). This test is more powerful.
Description
An parametric bootstrap alternative test version of the Likelihood ratio test (LRT) to test the hypotheses about a vector of population averages. This test has the advantage of being valid for high dimension data (n <p). This test should be preferred by the user, as it controlled the type I error and had greater power in all scenarios evaluated.
Usage
LRTTBoot(X, mu0, B)
Arguments
X |
a matrix n x p containing n observations and p variables. It should not contain missing values (NA). |
mu0 |
a vector containing the mean population to be tested. |
B |
the number of resamples bootstrap parametric which must be at least equal to 2000. |
Value
the numerical value and the p-value of the test statistic.
Examples
set.seed(0)
library(MASS)
n <- 30
p <- 2
rho <- 0.9
delta <- 0.9
mu <- rep(0, times = p)
Sigma <- (1 - rho) * diag(p) + rho * matrix(1, p, p)
mu0 <- rep(0.3271,times = p)
B <- 200
X <- mvrnorm(n, mu, Sigma)
LRTTBoot(X=X, mu0=mu0, B=B)
The robust likelihood ratio test parametric bootstrap with trace test (RTLRPBT).
Description
An robust alternative test version of the likelihood ratio test (LRT) parametric bootstrap with trace (RTLPBT) to test the hypotheses about a vector of population averages using the comedian robust estimator. This test has the advantage of being valid for high dimension data (n <p)
Usage
LRTTRBoot(X, mu0, B)
Arguments
X |
a matrix n x p containing n observations and p variables. It should not contain missing values (NA). |
mu0 |
a vector containing the mean population to be tested. |
B |
the number of resamples bootstrap parametric which must be at least equal to 2000. |
Value
the numerical value and the p-value of the test statistic.
Examples
set.seed(0)
library(MASS)
n <- 30
p <- 2
rho <- 0.9
delta <- 0.9
mu <- rep(0, times = p)
Sigma <- (1 - rho) * diag(p) + rho * matrix(1, p, p)
mu0 <- rep(0.3271,times = p)
B <- 200
X <- mvrnorm(n, mu, Sigma)
LRTTRBoot(X=X, mu0=mu0, B=B)
The likelihood ratio test with trace (TLRT)
Description
An asymptotic version of the Likelihood ratio test (LRT) to test the hypotheses about a vector of population averages. This test has the advantage of being valid for high dimension data (n < p).
Usage
LRTTrace(X, mu0)
Arguments
X |
a matrix n x p containing n observations and p variables. It should not contain missing values (NA). |
mu0 |
a vector containing the mean population to be tested. |
Value
the numerical value and the p-value of the test statistic.
Examples
set.seed(0)
library(MASS)
n <- 30
p <- 2
rho <- 0.9
delta <- 0.9
mu <- rep(0, times = p)
Sigma <- (1 - rho) * diag(p) + rho * matrix(1, p, p)
mu0 <- rep(0.3271,times = p)
X <- mvrnorm(n, mu, Sigma)
LRTTrace(X=X, mu0=mu0)
The parametric bootstrap T2 test (T2Boot).
Description
The parametric bootstrap version of the traditional T2 test.
Usage
T2Boot(X, mu0, B)
Arguments
X |
a matrix n x p containing n observations and p variables. It should not contain missing values (NA). |
mu0 |
a vector containing the mean population to be tested. |
B |
the number of resamples bootstrap parametric which must be at least equal to 2000. |
Value
the numerical value and the p-value of the test statistic.
References
Henrique J. P. Alves & Daniel F. Ferreira (2019): Proposition of new alternative tests adapted to the traditional T2 test, Communications in Statistics - Simulation and Computation, DOI: 10.1080/03610918.2019.1693596
Examples
set.seed(0)
library(MASS)
n <- 30
p <- 2
rho <- 0.9
delta <- 0.9
mu <- rep(0, times = p)
Sigma <- (1 - rho) * diag(p) + rho * matrix(1, p, p)
mu0 <- rep(0.3271,times = p)
B=2000
X <- mvrnorm(n, mu, Sigma)
T2Boot(X=X, mu0=mu0, B=2000)
The traditional T2 test (T2).
Description
The traditional T2 test (T2).
Usage
T2O(X, mu0)
Arguments
X |
a matrix n x p containing n observations and p variables. It should not contain missing values (NA). |
mu0 |
a vector containing the mean population to be tested. |
Value
the numerical value and the p-value of the test statistic.
References
Henrique J. P. Alves & Daniel F. Ferreira (2019): Proposition of new alternative tests adapted to the traditional T2 test, Communications in Statistics - Simulation and Computation, DOI: 10.1080/03610918.2019.1693596
Examples
set.seed(0)
library(MASS)
n <- 30
p <- 2
rho <- 0.9
delta <- 0.9
mu <- rep(0, times = p)
Sigma <- (1 - rho) * diag(p) + rho * matrix(1, p, p)
mu0 <- rep(0.3271,times = p)
X <- mvrnorm(n, mu, Sigma)
T2O(X=X, mu0=mu0)
The T2 robust parametric bootstrap test (T2RPB).
Description
The robust parametric bootstrap version of the traditional T2 test using the comedian robust estimator.
Usage
T2RobustBoot(X, mu0, B)
Arguments
X |
a matrix n x p containing n observations and p variables. It should not contain missing values (NA). |
mu0 |
a vector containing the mean population to be tested. |
B |
the number of resamples bootstrap parametric which must be at least equal to 2000. |
Value
the numerical value and the p-value of the test statistic.
References
Henrique J. P. Alves & Daniel F. Ferreira (2019): Proposition of new alternative tests adapted to the traditional T2 test, Communications in Statistics - Simulation and Computation, DOI: 10.1080/03610918.2019.1693596
Examples
set.seed(0)
library(MASS)
n <- 30
p <- 2
rho <- 0.9
delta <- 0.9
mu <- rep(0, times = p)
Sigma <- (1 - rho) * diag(p) + rho * matrix(1, p, p)
mu0 <- rep(0.3271,times = p)
B <- 200
X <- mvrnorm(n, mu, Sigma)
T2RobustBoot(X=X, mu0=mu0, B=B)
A graphical user interface (GUI) of the package TVMM
Description
A graphical user interface (GUI) of the package TVMM to perform more general hypothesis tests on the vector of multivariate population means.
https://rpubs.com/Henriqueufla/617206 for more details.
Usage
guiTVMM(gui = TRUE)
Arguments
gui |
Logical argument, |
Value
guiTVMM
A graphical user interface (GUI) for performing tests on the vector of multivariate population means.
References
Henrique J. P. Alves & Daniel F. Ferreira (2019): Proposition of new alternative tests adapted to the traditional T2 test, Communications in Statistics - Simulation and Computation, DOI: 10.1080/03610918.2019.1693596
Examples
library(TVMM)
if(interactive()){
guiTVMM(gui=FALSE)
}