sspca-package {sspca} | R Documentation |
sspca is used to perform the Super-sparse principal component analysis (SSPCA).
sspca(X, penalty="HL", super=TRUE, nc=1, tuning="CV")
X |
n-by-p data matrix, where n is the number of subjects and p is the number of variables. |
penalty |
"HL" is the unbounded penalty proposed by Lee and Oh (2009) and "Lasso" is the lasso penalty. |
super |
If TRUE, super-sparse PCA is performed with condition-number constrained data matrix instead of original data matrix |
nc |
Number of components |
tuning |
Tuning parameter for the sparsity. A vector of length nc. If tuning="CV", tuning parameters are selected automatically via 5-fold cross-validation. |
Super-sparse PCA uses two innovations to produce an extremely sparse loading vector: (i) a random-effect model on the loadings that leads to an unbounded penalty at the origin and (ii) shrinkage of the singular values obtained from the singular value decomposition of the data matrix.
PC |
A matrix with the principal component scores in each column |
Loading |
A matrix with the corresponding loadings in each column |
lambda |
tuning parameters, lambda |
Donghwan Lee, Woojoo Lee, Youngjo Lee and Yudi Pawitan
Lee, D., Lee, W., Lee, Y. and Pawitan, Y. (2010) Super-sparse principal component analyses for high-throughput genomic data, BMC Bioinformatics, 11:296.
n<-80 p<-20 X<-matrix(0,n,p) set.seed(1021) err<-rnorm(n*p, mean=0, sd=sqrt(0.1)) X<-matrix(err,n,p) v1<-rnorm(n,mean=0, sd=sqrt(2)) v2<-rnorm(n,mean=0, sd=sqrt(1)) v3<-rnorm(n,mean=0, sd=sqrt(1/2)) X[,1:4]<-X[,1:4]+v1 X[,5:8]<-X[,5:8]+v2 X[,9:10]<-X[,9:10]+v3 ## 1. Tuning parameters are specified by users sspca.spec<-sspca(X,penalty="HL",super=TRUE, nc=3,tuning=c(5,5,5)) ## 2. Tuning parameters are selected automatically via cross-validation sspca.cv<-sspca(X,penalty="HL",super=TRUE, nc=3,tuning="CV")