This function computes principal component (PC) loading from the result of the "prcomp" function.
(The "princomp" function is not supported. For "princomp" function, the "loadings" function in stats package should be used.)
In this function, data matrix is should be scaled to zero mean and unit variance (i.e. autoscaling) for each variables.
Usage
pca_loading(pca)
Value
The return value is a list object that contains the following elements:
R : PC loading (Correlation coefficient between PC score and each variables in data matrix.)
p.value : p-value of PC loading
Arguments
pca
The return object of the "prcomp" function.
Author
Hiroyuki Yamamoto
Details
The PC loading and the p-value by statistical hypothesis testing is added to the pca object returned by the "prcomp" function.
References
Yamamoto H., Fujimori T., Sato H., Ishikawa G., Kami K., Ohashi Y. (2014). "Statistical hypothesis testing of factor loading in principal component analysis and its application to metabolite set enrichment analysis". BMC Bioinformatics, (2014) 15(1):51.