The nipals package provides two functions to perform Principal Components Analysis of a matrix:
The nipals function uses Non-linear Iterative Partial Least Squares.
The empca function uses EM PCA.
NIPALS has been implemented several times in R packages. EMPCA has previously appeared in python, but is available in R here for the first time.
This package strives to have the best (fast and accurate) R implementations.
The empca() function should be considered experimental. There is a problem using empca() on matrices that are both (1) non-full rank (2) have missing values.
Key features
Missing values are allowed.
Uses Gram-Schmidt to ensure orthogonal principal components.
Carefully optimized for speed (nipals only, not empca).
Flexible options.
Vignettes and unit tests.
Weights are allowed (empca only).
Installation
# Install the released version from CRAN:
install.packages("nipals")
# Install the development version from GitHub:
install.packages("devtools")
devtools::install_github("kwstat/nipals")
nipals
Homepage: https://kwstat.github.io/nipals
Repository: https://github.com/kwstat/nipals
The
nipalspackage provides two functions to perform Principal Components Analysis of a matrix:nipalsfunction uses Non-linear Iterative Partial Least Squares.empcafunction uses EM PCA.NIPALS has been implemented several times in R packages. EMPCA has previously appeared in python, but is available in R here for the first time. This package strives to have the best (fast and accurate) R implementations.
The
empca()function should be considered experimental. There is a problem usingempca()on matrices that are both (1) non-full rank (2) have missing values.Key features
nipalsonly, notempca).empcaonly).Installation
Usage
See also
A python version of this package can be found at https://pypi.org/project/nipals/.