% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/reduction-methods.R
\name{poplin_reduce_pca}
\alias{poplin_reduce_pca}
\alias{poplin_reduce_pca,poplin-method}
\title{Principal component analysis (PCA)}
\usage{
\S4method{poplin_reduce_pca}{matrix}(x, ncomp = 2, center = TRUE, scale = FALSE, ...)

\S4method{poplin_reduce_pca}{poplin}(
  x,
  poplin_in,
  poplin_out,
  ncomp = 2,
  center = 2,
  scale = FALSE,
  ...
)
}
\arguments{
\item{x}{A matrix or \linkS4class{poplin} object.}

\item{ncomp}{Output dimensionality.}

\item{center}{A logical indicating mean-centering prior to PCA.}

\item{scale}{A logical indicating unit variance scaling prior to PCA.}

\item{...}{Additional arguments passed to \link[pcaMethods:bpca]{pcaMethods::bpca}.}

\item{poplin_in}{Name of a data matrix to retrieve.}

\item{poplin_out}{Name of a data matrix to store.}
}
\value{
A poplin.pca matrix or \linkS4class{poplin} object with the same
number of rows as \code{ncol(x)} containing the dimension reduction
result.
}
\description{
Apply PCA to a matrix or \linkS4class{poplin} object. For the data without
missing values, PCA is performed via a singular value decomposition.
Otherwise, Bayesian PCA is performed using \link[pcaMethods:bpca]{pcaMethods::bpca} from the
\pkg{pcaMethods} package. Note that Bayesian PCA does not force
orthogonality between factor loadings.
}
\references{
Shigeyuki Oba, Masa-aki Sato, Ichiro Takemasa, Morito Monden, Ken-ichi
Matsubara, Shin Ishii, A Bayesian missing value estimation method for gene
expression profile data, Bioinformatics, Volume 19, Issue 16, 1 November
2003, Pages 2088–2096, https://doi.org/10.1093/bioinformatics/btg287
}
\seealso{
Other data reduction methods: 
\code{\link{poplin_reduce_plsda}()},
\code{\link{poplin_reduce_tsne}()},
\code{\link{poplin_reduce}()}
}
\concept{data reduction methods}