na_advise_lipidomics: na_advise_lipidomics

View source: R/na_advise_lipidomics.R

na_advise_lipidomicsR Documentation

na_advise_lipidomics

Description

na_advise_lipidomics is the function for coping with NA values, filtering rows and columns (replicates/samples and lipid species) for a selected percentage of NA values, and imputing survived NA values with different imputation methods.

Usage

na_advise_lipidomics(
  out,
  na_filter_lip = 0.3,
  na_filter_sam = 0.6,
  imputation_met = "median",
  imputation_val = 0.001
)

Arguments

out

List. It is the result from the recovery_advise_lipidomics function.

na_filter_lip

Numeric value. It is the upper bound percentage of accepted NA values for lipid species, in decimal format. Default = 0.3.

na_filter_sam

Numeric value. It is the upper bound percentage of accepted NA values for replicates/samples, in decimal format. Default = 0.6.

imputation_met

Character string. It is the imputation method used to cope with the presence of the survived NA values after the filtering. The imputation method can be: "mean", "median", "knn" or "irmi". Default = "median".

imputation_val

Numeric value. It is the imputation value to substitute in the place of NA values when "median" or "mean" imputation method is selected, in decimal format. Default = 0.001.

Details

The imputation step is composed of two substeps: a) the NA values are filtered per replicates/samples and lipid species, taking into account two percentage values (upper bounds) selected by the user; b) the survived NA values are imputed with a method selected by the user. More in details, four imputation methods are available: - "median", the NA values are imputed with the median from related replicates (for a sample values) per lipid species, and survived NA are corrected with the imputation value; - "mean", the NA values are imputed with the mean from related replicates (for a sample values) per lipid species, and survived NA are corrected with the imputation value; - "knn", k-Nearest Neighbour imputation based on a variation of the Gower Distance, applied on replicates/samples; - "irmi", Iterative Robust Model-based Imputation, where in each step of the iteration, one variable is used as a response variable, and the remaining variables serve as the regressors, applied on replicates/samples. The list of the filtered samples is stored with the results.

Value

res: a list with results from recovery step, updated with the imputed concentration matrix and the list of the filtered out samples.

Note

Last change 17/12/2021


ShinyFabio/ADViSELipidomics documentation built on March 21, 2023, 7:30 a.m.