prcomp.qts_sample {squat}R Documentation

PCA for QTS Sample

Description

This is the S3 specialization of the function stats::prcomp() for QTS samples.

Usage

## S3 method for class 'qts_sample'
prcomp(x, M = 5, fit = FALSE, ...)

Arguments

x

An object of class qts_sample.

M

An integer value specifying the number of principal component to compute. Defaults to 5L.

fit

A boolean specifying whether the resulting prcomp_qts object should store a reconstruction of the sample from the retained PCs. Defaults to FALSE.

...

Arguments passed to or from other methods.

Details

The mean_qts component of the resulting object is the QTS used for centering. It it part of the prcomp_qts object because it is needed to reconstruct the sample from the retained PCs. The prcomp_qts object also contains the total variance of the sample and the percentage of variance explained by each PC.

Value

An object of class prcomp_qts which is a list with the following components:

Examples

res_pca <- prcomp(vespa64$igp[1:16])

[Package squat version 0.3.0 Index]