Description Usage Arguments Details Value Author(s) References See Also Examples
View source: R/pca_functions.R
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.
1 2 |
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 |
The different choices for method
are:
"d.gsp
": d-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.
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 k^{th} element of the array is the estimated cosine of the angle between k^{th} sample and population eigenvectors. If |
correlations |
An array of estimated correlations between the sample and population PC scores corresponding to the distant spikes. The k^{th} element of the array is the estimated correlation between k^{th} sample and population PC scores. If |
shrinkage |
An array of estimated asymptotic shrinkage factors corresponding to the distant spikes. If |
loss |
If |
nonspikes |
If |
Rounak Dey, deyrnk@umich.edu
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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.