pairwiseKStest {MTest}R Documentation

pairwiseKStest

Description

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

Usage

pairwiseKStest(X,alternative="greater")

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.

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.

Author(s)

Víctor Morales Oñate, victor.morales@uv.cl, https://sites.google.com/site/moralesonatevictor/,https://www.linkedin.com/in/vmoralesonate/ Bolívar Morales Oñate, bmoralesonate@gmail.com, https://sites.google.com/site/moralesonatevictor/

References

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

Examples

library(MTest)
data(simDataMTest)
pairwiseKStest(X=simDataMTest)

[Package MTest version 1.0.2 Index]