Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

R2VX-pcaRes-method

R2 goodness of fit


Description

Flexible calculation of R2 goodness of fit.

Usage

## S4 method for signature 'pcaRes'
R2VX(object, direction = c("variables",
  "observations", "complete"), data = completeObs(object),
  pcs = nP(object))

Arguments

object

a PCA model object

direction

choose between calculating R2 per variable, per observation or for the entire data with 'variables', 'observations' or 'complete'.

data

the data used to fit the model

pcs

the number of PCs to use to calculate R2

Value

A vector with R2 values

Author(s)

Henning Redestig

Examples

R2VX(pca(iris))

pcaMethods

A collection of PCA methods

v1.82.0
GPL (>= 3)
Authors
Wolfram Stacklies, Henning Redestig, Kevin Wright
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.