ppca: Probabilistic Principal Components Analysis via Expectation...

Description Usage Arguments Value References Examples

View source: R/PCAandFA.R

Description

This is simply an alternative to R's principal and prcomp functions that uses expectation maximization to fit the PCA in the presence of missing values. If there are no missing values the output should be virtually identical to the pca function, save for sign changes in the eigenvectors and loadings, and small numerical differences. The 'sensible principal components analysis' EM algorithm described by Rowels (1997) is implemented here. It is simply a variant of Tipping & Bishop's (1997) EM algorithm.

Usage

1
2
3
4
5
6
7
ppca(
  x,
  ncomp = min(nrow(x) - 1, ncol(x)),
  scale = TRUE,
  maxit = 1000,
  tol = 1e-04
)

Arguments

x

a matrix or data frame containing only numeric variables

ncomp

the number of components to retain.

scale

should the variables be scaled prior to analysis? Defaults to TRUE.

maxit

maximum number of iterations for expectation maximization. defaults to 1000.

tol

tolerance for convergence. defaults to 1e-4.

Value

an object of class PrincipalComp

References

Tipping, M. & Bishop, C. Probabilistic principal component analysis. Technical Report NCRG/97/010, Neural Computing Research Group, Aston University, September 1997.

Rowels, S.(1997) EM algorithms for PCA and SPCA. NIPS'97: Proceedings of the 10th International Conference on Neural Information Processing Systems

Examples

1
ppca(x, 3)

abnormally-distributed/cvreg documentation built on May 3, 2020, 3:45 p.m.