Hi all, I am using nsprcomp() from nsprcomp package to run sparse PCA. The 
output is very much like regular PCA by prcomp() in that it provides "sdev" for 
standard deviation of principle components (PC). 


For regular PCA by prcomp(), we can easily calculate the percent of total 
variance explained by the first k PCs by using cumsum(obj$sdev^2) because these 
PCs are independent of each other so you can simply add up the variance of 
these PCs. For sparse PCA, as far as I understand, the generated PCs are not 
independent of each other anymore, so you can not simply add up variances to 
calculate percentage of variance explained by the first k PCs. For example, in 
the package of elasticnet where spca() also performs sparse PCA, one of the 
output from spca() is "pev" for percent explained variation which is based on 
so-called "adjusted" variance that adjusted for the fact that these variances 
of PCs are not independent anymore.

My question is for nsprcomp, how can I calculate percent explained variation by 
using "sdev" when I know these PCs are not independent of each other?

Thanks!

John
        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to