This function is used in the data preparation (or pre-processing)
often required to apply the exploratory and inference tools based on
theory of records within this package.
Given a matrix X
considered as a set of \(M^*\) vectors, which
are the columns of X
, this function extracts the biggest subset
of uncorrelated vectors (columns), using the following procedure: starting
from column m
, the test cor.test
is applied to
study the correlation between columns depending on argument type
.
If type = "adjacent"
, the test is computed between m
and \(\code{m} + 1, \code{m} + 2, \ldots\) and so on up to find a column
\(\code{m} + k\) which is not significantly correlated with column
m
. Then, the process is repeated starting at column
\(\code{m} + k\). All columns are checked.
When the first and last columns may not have a significant correlation,
where m
is the first column, the parameter first.last
should
be FALSE
. When the first and last columns could be correlated,
the function requires first.last = TRUE
.
If type = "all"
, the procedure is similar as above but the new kept
column cannot be significant correlated with any other column already
kept, not only the previous one. So this option results in a fewer number
of columns.