Returns the \(p\)-value of the columns of X (pairwisely).
pairwiseKStest(X,alternative="greater")Returns an object of class pairwiseKStest.
An object of class pairwiseKStest is a list containing
at most the following components:
\(p\)-values matrix of pairwise KS testing;
Character; indicates the alternative hypothesis.
Character; indicates row sums (or col sums) of KSpwMatrix suggesting the removal order in case that is the strategy for dealing with multicollinearity.
Numeric; a matrix (Bvals output from MTest function) whose columns are to be compared.
String; letter of the value, but the argument name must be given in full. See ‘ks.test’ for the meanings of the possible values.
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/
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.
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")
library(MTest)
data(simDataMTest)
pairwiseKStest(X=simDataMTest)
Run the code above in your browser using DataLab