Title: | Multivariate Tests for the Vector of Means |
---|---|
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>). |
Authors: | Henrique Jose de Paula Alves [aut, cre], Ben Deivide de Oliveira Batista [ctb], Daniel Furtado Ferreira [aut] |
Maintainer: | Henrique Jose de Paula Alves <[email protected]> |
License: | GPL-2 |
Version: | 3.2.1 |
Built: | 2025-03-10 02:33:18 UTC |
Source: | https://github.com/cran/TVMM |
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.
guiTVMM(gui = TRUE)
guiTVMM(gui = TRUE)
gui |
Logical argument, |
guiTVMM
A graphical user interface (GUI) for performing tests on the vector of multivariate population means.
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
library(TVMM) if(interactive()){ guiTVMM(gui=FALSE) }
library(TVMM) if(interactive()){ guiTVMM(gui=FALSE) }
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.
LRTTBoot(X, mu0, B)
LRTTBoot(X, mu0, B)
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. |
the numerical value and the p-value of the test statistic.
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)
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)
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).
LRTTrace(X, mu0)
LRTTrace(X, mu0)
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. |
the numerical value and the p-value of the test statistic.
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)
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)
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)
LRTTRBoot(X, mu0, B)
LRTTRBoot(X, mu0, B)
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. |
the numerical value and the p-value of the test statistic.
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)
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 parametric bootstrap version of the traditional T2 test.
T2Boot(X, mu0, B)
T2Boot(X, mu0, B)
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. |
the numerical value and the p-value of the test statistic.
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
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)
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).
T2O(X, mu0)
T2O(X, mu0)
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. |
the numerical value and the p-value of the test statistic.
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
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)
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 robust parametric bootstrap version of the traditional T2 test using the comedian robust estimator.
T2RobustBoot(X, mu0, B)
T2RobustBoot(X, mu0, B)
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. |
the numerical value and the p-value of the test statistic.
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
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)
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)