filterCollinearities {qpgraph} | R Documentation |
Filters out variables or features that lead to collinearities in the input data.
filterCollinearities(X, soft.filter=FALSE, long.dim.are.variables=TRUE)
X |
data set where collinearities are identified. |
soft.filter |
logical; if FALSE (default) then the intput object
|
long.dim.are.variables |
logical; if TRUE (default) it is assumed
that when |
The input object X
can be either a matrix
object, a
data.frame
object or any other class of object that can be
handled by the function qpPCC()
, which is internally called,
such as an ExpressionSet
object.
The input object X
without the variables or features that
lead to collinearities when soft.filter=FALSE
, its default
value. Otherwise, when soft.filter=TRUE
then a logical mask
is returned.
R. Castelo
## build an undirected GMM model with ## average correlation 0.99 on the present edges set.seed(1234) gmm <- rUGgmm(dRegularGraphParam(), rho=0.99) gmm ## sample n=100 observations from this GMM X <- rmvnorm(100, gmm) dim(X) head(X) ## notice some variables lead to collinearities (r > 0.99) cor(X) ## mask those variables mask <- filterCollinearities(X, long.dim.are.variables=FALSE, soft.filter=TRUE) mask head(X[, !mask])