impute_pca: Principal component analysis (PCA) imputation

Description Usage Arguments Value References See Also Examples

Description

Apply PCA imputation to a matrix or poplin object. This is a interface to the pca function from the pcaMethods package. Here, features are interpreted as variables and samples as observations. Pre-processing of input (centering, scaling) may be necessary. See the documentation of pca. Note that the PCA imputation could yield negative feature values that need to be post-processed.

Usage

1
2
3
4
5
## S4 method for signature 'matrix'
impute_pca(x, type = c("nipals", "bpca", "ppca", "svdImpute"), ...)

## S4 method for signature 'poplin'
impute_pca(x, xin, xout, type = c("nipals", "bpca", "ppca", "svdImpute"), ...)

Arguments

x

A matrix or poplin object.

type

The method to perform PCA.

...

Additional arguments passed to pca.

xin

Character specifying the name of data to retrieve from x when x is a poplin object.

xout

Character specifying the name of data to store in x when x is a poplin object.

Value

A matrix or poplin object of the same dimension as x containing the imputed intensities.

References

Stacklies, W., Redestig, H., Scholz, M., Walther, D. and Selbig, J. pcaMethods – a Bioconductor package providing PCA methods for incomplete data. Bioinformatics, 2007, 23, 1164-1167

See Also

Other imputation methods: impute_knn(), impute_randomforest(), impute_univariate(), poplin_impute()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
data(faahko_poplin)

if (requireNamespace("pcaMethods", quietly = TRUE)) {
  ## poplin object
  impute_pca(faahko_poplin, xin = "raw", xout = "ppca", type = "ppca",
             center = TRUE, scale = "uv")

  ## matrix
  m <- poplin_raw(faahko_poplin, "raw")
  impute_pca(m, type = "ppca", center = TRUE, scale = "uv")
}

jaehyunjoo/poplin documentation built on Jan. 8, 2022, 1:13 a.m.