PomaImpute: Impute Missing Values

View source: R/PomaImpute.R

PomaImputeR Documentation

Impute Missing Values

Description

PomaImpute performs missing value imputation on a dataset using various imputation methods.

Usage

PomaImpute(
  data,
  zeros_as_na = FALSE,
  remove_na = TRUE,
  cutoff = 20,
  group_by = TRUE,
  method = "knn"
)

Arguments

data

A SummarizedExperiment object.

zeros_as_na

Logical. Indicates if the zeros in the data are missing values. Default is FALSE.

remove_na

Logical. Indicates if features with a percentage of missing values over the cutoff parameter should be removed. Default is TRUE.

cutoff

Numeric. Percentage of missing values allowed in each feature.

group_by

Logical. If metadata file is present and its first variable is a factor, it can be used to compute missing values per group and drop them accordingly. Features will be removed only if all of the groups contain more missing values than allowed. Default is TRUE.

method

Character. The imputation method to use. Options include "none" (no imputation, replace missing values by zeros), "half_min" (replace missing values with half of the minimum value), "median" (replace missing values with the median), "mean" (replace missing values with the mean), "min" (replace missing values with the minimum value), "knn" (replace missing values using k-nearest neighbors imputation), and "random_forest" (replace missing values using random forest imputation).

Value

A SummarizedExperiment object without missing values.

Author(s)

Pol Castellano-Escuder

References

Armitage, E. G., Godzien, J., Alonso‐Herranz, V., López‐Gonzálvez, Á., & Barbas, C. (2015). Missing value imputation strategies for metabolomics data. Electrophoresis, 36(24), 3050-3060.

Examples

data("st000336")

PomaImpute(st000336, method = "knn")

pcastellanoescuder/POMA documentation built on March 15, 2024, 10:08 p.m.