impute_na {lipidr}R Documentation

Impute missing values in a LipidomicsExperiment

Description

Impute missing values in a LipidomicsExperiment

Usage

impute_na(
  data,
  measure = "Area",
  method = c("knn", "svd", "mle", "QRILC", "minDet", "minProb", "zero"),
  ...
)

Arguments

data

LipidomicsExperiment object.

measure

Which measure to use as intensity, usually Area, Area Normalized or Height. Default is Area.

method

The imputation method to use. All methods are wrappers for imputeLCMD package. These include

...

Other arguments passed to the imputation method.

Value

LipidomicsExperiment object with missing values imputed.

Examples

data(data_normalized)

# Replace with values calculated using K-nearest neighbors
impute_na(data_normalized, "Area", "knn", 10)

# Replace with values calculated from the first K principal components
impute_na(data_normalized, "Area", "svd", 3)

# Replace with Maximum likelihood estimates
impute_na(data_normalized, "Area", "mle")

# Replace with randomly drawn values from a truncated distribution
impute_na(data_normalized, "Area", "QRILC")

# Replace with a minimal value
impute_na(data_normalized, "Area", "minDet")

# Replace with randomly drawn values from a Gaussian distribution
# cerntered around a minimal value
impute_na(data_normalized, "Area", "minProb")

# Replace with zero (not recommended)
impute_na(data_normalized, "Area", "zero")

[Package lipidr version 2.6.0 Index]