muvr_analysis: MUVR

View source: R/multivariate.R

muvr_analysisR Documentation

MUVR

Description

A wrapper around the MUVR algorithm from the MUVR package. For more information about the algorithm, visit https://gitlab.com/CarlBrunius/MUVR.

Usage

muvr_analysis(
  object,
  y = NULL,
  id = NULL,
  multi_level = FALSE,
  multi_level_var = NULL,
  covariates = NULL,
  static_covariates = NULL,
  all_features = FALSE,
  nRep = 5,
  nOuter = 6,
  nInner = nOuter - 1,
  varRatio = 0.75,
  method = c("PLS", "RF"),
  ...
)

Arguments

object

a MetaboSet object

y

character, column name in pData of the target variable to predict

id

character, column name in pData of the subject ID variable in case of repeated measurements

multi_level

logical, whether multi-level modeling should be applied, see Details

multi_level_var

character, column name in pData of the variable for splitting the data in multi-level modeling

covariates, static_covariates

character, column names of pData to use as covariates in the model, in addition to molecular features. For multi-level moddels, the change in covariates is computed, while static_covariates are taken from the first time point. static_covariates are ignored for non-multi-level models.

all_features

logical, should all features be included in the model? if FALSE, flagged features are left out

nRep

Number of repetitions of double CV, parameter of MUVR

nOuter

Number of outer CV loop segments, parameter of MUVR

nInner

Number of inner CV loop segments, parameter of MUVR

varRatio

Ratio of variables to include in subsequent inner loop iteration, parameter of MUVR

method

Multivariate method. Supports 'PLS' and 'RF', parameter of MUVR

...

other parameters to MUVR::MUVR

Details

For example, sex should be entered as a static covariate, since the change in sex is zero for all individuals, so computing the change and using that as a covariate does not make sense.

See Also

MUVR

Examples

## Not run: 
# Simple model, only 1 repetition for a quick example
rf_model <- muvr_analysis(drop_qcs(merged_sample), y = "Group", nRep = 1, method = "RF")

# PLS on multilevel variable
pls_model <- muvr_analysis(drop_qcs(example_set),
  multi_level = TRUE,
  id = "Subject_ID", multi_level_var = "Time"
)

## End(Not run)


antonvsdata/notame documentation built on Sept. 14, 2024, 11:09 p.m.