perm.features {OmicsMarkeR} | R Documentation |
Applies Monte Carlo permutations to user specified models.
The user can either use the results from fs.stability
or provide
specified model parameters.
perm.features(fs.model = NULL, X, Y, method, sig.level = 0.05, nperm = 10, allowParallel = FALSE, verbose = TRUE, ...)
fs.model |
Object containing results from |
X |
A scaled matrix or dataframe containing numeric values of each feature |
Y |
A factor vector containing group membership of samples |
method |
A vector listing models to be fit.
Available options are |
sig.level |
Desired significance level for features,
default |
nperm |
Number of permutations, default |
allowParallel |
Logical argument dictating if parallel processing
is allowed via foreach package.
Default |
verbose |
Logical argument whether output printed automatically in 'pretty' format. |
... |
Extra arguments that the user would like to apply to the models |
sig.level |
User-specified significance level |
num.sig.features |
Number of significant features |
sig.features |
Dataframe of significant features |
Charles Determan Jr.
Wongravee K., et. al. (2009) Monte-Carlo methods for determining optimal number of significant variables. Application to mouse urinary profiles. Metabolomics 5:387-406.
dat.discr <- create.discr.matrix( create.corr.matrix( create.random.matrix(nvar = 50, nsamp = 100, st.dev = 1, perturb = 0.2)), D = 10 ) vars <- dat.discr$discr.mat groups <- dat.discr$classes fits <- fs.stability(vars, groups, method = c("plsda", "rf"), f = 10, k = 3, k.folds = 10, verbose = 'none') # permute variables/features perm.features(fits, vars, groups, "rf", sig.level = .05, nperm = 10)