nipals: Principal component analysis

Description Usage Arguments Value Examples

Description

Calculates the principal components accorindg to the algorithm by Wold

Usage

1
nipals(X, a, it = 10, tolerance = 1e-04)

Arguments

X

matrix or numeric dataframe.

a

integer, number of principal components to calculate.

it

integer, maximum number of iterations if error tolerance is not reached.

tolerance

float, precision tolerance.

Value

list, T: PCA scores. P: PCA loadings. pcvar: proportion of varation explained by PCA components

Examples

1
2
data(iris)
nipals(iris[, 1:4], a = 2)

Swarchal/charDirection documentation built on May 9, 2019, 3:25 p.m.