hdpc_est {hdpca} | R Documentation |
High-dimensional PCA estimation
Description
Estimates the population eigenvalues, angles between the sample and population eigenvectors, correlations between the sample and population PC scores, and the asymptotic shrinkage factors. Three different estimation methods can be used.
Usage
hdpc_est(samp.eval, p, n, method = c("d.gsp", "l.gsp", "osp"),
n.spikes, n.spikes.max, n.spikes.out, nonspikes.out = FALSE, smooth = TRUE)
Arguments
samp.eval |
Numeric vector containing the sample eigenvalues. The vector must have dimension |
p |
The number of features. |
n |
The number of samples. |
method |
String specifying the estimation method. Possible values are " |
n.spikes |
Number of distant spikes in the population (Optional). |
n.spikes.max |
Upper bound of the number of distant spikes in the population. Optional, but needed if |
n.spikes.out |
Number of distant spikes to be returned in the output (Optional). If not specified, all the estimated distant spikes are returned. |
nonspikes.out |
Logical. If |
smooth |
Logical. If |
Details
The different choices for method
are:
"
d.gsp
":-estimation method based on the Generalized Spiked Population (GSP) model.
"
l.gsp
":-estimation method based on the GSP model.
"
osp
": Estimation method based on the Ordinary Spiked Population (OSP) model.
At least one of n.spikes
and n.spikes.max
must be provided. If n.spikes
is provided then n.spikes.max
is ignored, else n.spikes.max
is used to find out the number of distant spikes using select.nspike
.
The argument nonspikes.out
is ignored if method="d.gsp"
.
The argument smooth
is useful when the user assumes the population spectral distribution to be continuous.
Value
spikes |
An array of estimated distant spikes. If |
n.spikes |
Number of distant spikes. If |
angles |
An array of estimated cosines of angles between the sample and population eigenvectors corresponding to the distant spikes. The |
correlations |
An array of estimated correlations between the sample and population PC scores corresponding to the distant spikes. The |
shrinkage |
An array of estimated asymptotic shrinkage factors corresponding to the distant spikes. If |
loss |
If |
nonspikes |
If |
Author(s)
Rounak Dey, deyrnk@umich.edu
References
Dey, R. and Lee, S. (2019). Asymptotic properties of principal component analysis and shrinkage-bias adjustment under the generalized spiked population model. Journal of Multivariate Analysis, Vol 173, 145-164.
See Also
Examples
data(hapmap)
#n = 198, p = 75435 for this data
####################################################
## Not run:
train.eval<-hapmap$train.eval
n<-hapmap$nSamp
p<-hapmap$nSNP
m<-select.nspike(train.eval,p,n,n.spikes.max=10,evals.out=FALSE)$n.spikes
out<-hdpc_est(train.eval, p, n, method = "d.gsp",
n.spikes=m, n.spikes.out=2, nonspikes.out = FALSE) #Output 2 spikes, no non-spike
out<-hdpc_est(train.eval, p, n, method = "l.gsp",
n.spikes=m, nonspikes.out = FALSE) #Output m many spikes, no non-spike
out<-hdpc_est(train.eval, p, n, method = "l.gsp",
n.spikes.max=10, nonspikes.out = TRUE) #Output all eigenvalues
out<-hdpc_est(train.eval, p, n, method = "osp",
n.spikes=m, n.spikes.out=2, nonspikes.out = TRUE) #Output m many spikes, no non-spike
## End(Not run)