Learn R Programming

MTest (version 1.0.2)

pairwiseKStest: pairwiseKStest

Description

Returns the \(p\)-value of the columns of X (pairwisely).

Usage

pairwiseKStest(X,alternative="greater")

Value

Returns an object of class pairwiseKStest. An object of class pairwiseKStest is a list containing at most the following components:

KSpwMatrix

\(p\)-values matrix of pairwise KS testing;

alternative

Character; indicates the alternative hypothesis.

Suggestion

Character; indicates row sums (or col sums) of KSpwMatrix suggesting the removal order in case that is the strategy for dealing with multicollinearity.

Arguments

X

Numeric; a matrix (Bvals output from MTest function) whose columns are to be compared.

alternative

String; letter of the value, but the argument name must be given in full. See ‘ks.test’ for the meanings of the possible values.

Details

Using a pairwise Kolmogorov-Smirnov (KS) test of a given matrix X. In particular, if X is the Bvals output from MTest function, pairwiseKStest establishes a guide for an educated removal of variables that are causing multicolli-nearity.

Note that the matrix \(B_{n_{boot}\times (p+1)}\) (which is Bvals output from MTest function) allow us to inspect results in detail and make further tests such as boxplots, pariwise Kolmogorov-Smirnov (KS) of the predictors and so on.

References

Morales-Oñate, V., and Morales-Oñate, B. (2023). MTest: a Bootstrap Test for Multicollinearity. Revista Politécnica, 51(2), 53–62. tools:::Rd_expr_doi("https://doi.org/10.33333/rp.vol51n2.05")

Examples

Run this code
library(MTest)
data(simDataMTest)
pairwiseKStest(X=simDataMTest)

Run the code above in your browser using DataLab