impute_na: Impute missing values in a LipidomicsExperiment

Description Usage Arguments Value Examples

View source: R/impute.R

Description

Impute missing values in a LipidomicsExperiment

Usage

1
2
3
4
5
6
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

  • knn Wraps imputeLCMD::impute.wrapper.KNN(). Default. This requires an additional argument K (Number of neighbors used to infer the missing data).

  • svd Wraps imputeLCMD::impute.wrapper.SVD(). This requires an additional argument K (Number of principal components to use).

  • mle Wraps imputeLCMD::impute.wrapper.MLE(),

  • minDet Wraps imputeLCMD::impute.MinDet(),

  • minProb Wraps imputeLCMD::impute.MinProb(),

  • zero Wraps imputeLCMD::impute.ZERO(),

...

Other arguments passed to the imputation method.

Value

LipidomicsExperiment object with missing values imputed.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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")

lipidr documentation built on Nov. 8, 2020, 7:50 p.m.