| Title: | Principal Component Analysis with Automated Interpretation and Visualization |
|---|---|
| Description: | Provides an automated workflow for Principal Component Analysis (PCA) that simplifies multivariate data analysis by performing essential preprocessing, statistical tests, component extraction, and visualization in a single function call. The package automatically standardizes variables, computes correlation matrices, performs Kaiser-Meyer-Olkin (KMO) and Bartlett's tests, determines the optimal number of principal components using multiple selection criteria, generates component loadings and scores, and produces publication-ready tables and graphical outputs for researchers and students. Methodological background is described in Shankar et al. (2024) <doi:10.1007/s12665-024-11985-5>. |
| Authors: | S. Vishnu Shankar [aut, cre], V. Lavanya [aut], Santosha Rathod [aut], Mrinmoy Ray [aut], Anil Kumar [aut], Balaji Kannan [aut] |
| Maintainer: | S. Vishnu Shankar <[email protected]> |
| License: | GPL-3 |
| Version: | 0.1.1 |
| Built: | 2026-09-30 12:35:22 UTC |
| Source: | https://github.com/cran/EasyPCA |
Provides an automated workflow for Principal Component Analysis (PCA) that simplifies multivariate data analysis by performing essential preprocessing, statistical tests, component extraction, and visualization in a single function call. The package automatically standardizes variables, computes correlation matrices, performs Kaiser-Meyer-Olkin (KMO) and Bartlett's tests, determines the optimal number of principal components using multiple selection criteria, generates component loadings and scores, and produces publication-ready tables and graphical outputs for researchers and students.
EasyPCA( Data, scale = TRUE, components = "auto", cumulative = 75, rotation = c("varimax", "promax", "none"), verbose = TRUE, plots = interactive() )EasyPCA( Data, scale = TRUE, components = "auto", cumulative = 75, rotation = c("varimax", "promax", "none"), verbose = TRUE, plots = interactive() )
Data |
A numeric data frame or matrix containing the variables to be analyzed using Principal Component Analysis. |
scale |
Logical value indicating whether the variables should be
standardized before PCA. The default is |
components |
Number of principal components to retain. The default is
|
cumulative |
Minimum cumulative percentage of explained variance
required for component selection. The default is |
rotation |
Character string specifying the rotation method used for
interpreting principal components. Available options are
|
verbose |
Logical value. If |
plots |
Logical value. If |
The returned object stores the full PCA workflow output, including test results, eigen decomposition summaries, scores, loadings, and variable importance measures. The function also produces scree plots, correlation heatmaps, score plots, loading plots, biplots, and contribution charts when called.
An object of class "EasyPCA" returned invisibly, containing:
Call
Data
Correlation_Matrix
KMO
Bartlett_Test
PCA
Eigenvalues
Eigenvectors
Scores
Loadings
Rotation
Rotated_Loadings
Cos2
Communality
Variable_Importance
Top_Variables
Recommended_PC
Selection_Table
Variance_Explained
Cumulative_Variance
Shankar, S. V., Kumaraperumal, R., Radha, M., Kannan, B., Patil, S. G., Vanitha, G., ... & Ananthakrishnan, S. (2024). Generation of digital soil mapping for Coimbatore districts using multinomial logistic regression approach. Environmental Earth Sciences, 83(24), 677. doi:10.1007/s12665-024-11985-5
data(USArrests) Model <- EasyPCA(Data = USArrests) Modeldata(USArrests) Model <- EasyPCA(Data = USArrests) Model
Produces a scree plot for an EasyPCA object.
## S3 method for class 'EasyPCA' plot(x, type = "scree", ...)## S3 method for class 'EasyPCA' plot(x, type = "scree", ...)
x |
An object of class |
type |
Type of plot. Currently only |
... |
Additional graphical arguments passed to
|
Invisibly returns the input object x, which is an object of class
"EasyPCA". The function is primarily called for its graphical
side effect of drawing a scree plot on the active graphics device.