comprcomp: Function comprcomp.

Description Usage Arguments Details Value

View source: R/comprcomp.lib.R

Description

This function is inspired by the base function prcomp for PCA and shares similarities in arguments (center and scale arguments), and methods (e.g. scores).

Usage

1
comprcomp(X, Y, center = TRUE, scale = FALSE, ncomp = 0, ...)

Arguments

X

A matrix of data points (raw data).

Y

A vector of classes (factor).

center

A logical value indicating centering (per variable/per column).

scale

A logical value indicating scaling to unit variance (per variable/per column).

ncomp

The numberof components. The default value is 0, that means computing of all components.

...

Arguments to be passed to cpca function.

Details

The difference is that comprcomp computes CPCA by calling cpca function.

The advantage of using comprcomp instead of cpca function is that the input data are given the format observaions vs. variables, and construction of covariance matrices, as well as pre-procesing routines, are implemented inside of comprcomp function. Consequently, projection of new data, plotting, etc are easier (as easy as using prcomp function).

comprcomp function is a constructor for comprcomp class.

Value

A object of class comprcomp.


variani/cpca documentation built on May 3, 2019, 4:34 p.m.