Learn R Programming

KSA (version 0.1.0)

RCC_PCA: Retained Component Criterion for Principal Component Analysis

Description

The Retained Component Criterion for Principal Component Analysis (RCC_PCA) is build under the KSA backage, which is named after my home country the Kingdom of Saudi Arabia. The RCC_PCA criterion is a new tool to determine the optimal number of components (i.e. PCs) to retain for Principal Component Analysis (PCA). This criterion balances between the following two desires, reducing the dimension of the data and increasing the accuracy of the final results of PCA; See Alshammri (2022).

Usage

RCC_PCA(x)

Value

The values of RCC criterion

Arguments

x

a N-by-m data matrix, where the rows are "N" observations, and the columns are "m" variables

Author

Fayed Alshammri

References

Alshammri, F. (2022). Retained component criterion for optimizing principal component analysis. Manuscript submitted for publication.

Examples

Run this code
##The data matrix x is the scalled first four variables of "iris data" with m=4 and N=150.
x=scale(iris[,1:4])

##calculate and plot the RCC_PCA values of x after applying PCA.
myresults=RCC_PCA(x)

##lists the values of RCC criterion
myresults

Run the code above in your browser using DataLab