Description Usage Arguments Value References Examples
The function calculates consistent estimators of moments of the spectral distribution of the population covariance matrix given the spectral of the sample covariance matrix.
1 | moments_PSD(eigenvalues, n, mom_degree)
|
eigenvalues |
all eigenvalues of the sample covariance matrix including 0's. |
n |
degree of freedom of the sample covariance matrix. |
mom_degree |
the maximum order of moments. |
Estimators of moments from the first to the mom_degree
-th order.
Bai, Z., Chen, J., & Yao, J. (2010). On estimation of the population spectral distribution from a high-dimensional sample covariance matrix. Australian & New Zealand Journal of Statistics, 52(4), 423-437.
1 2 3 4 5 6 7 8 9 10 11 12 | set.seed(10086)
n = 400; p= 500
pop_eig = seq(10,1,length = p)
# Data with covariance matrix diag(pop_eig)
Z = matrix(rnorm(n*p),n,p)
X = Z %*% diag(sqrt(pop_eig))
raw_eig = svd(cov(X))$d
emp_eig = raw_eig[raw_eig>=0]
# Moments of population spectral distribution
colMeans(outer(pop_eig, 1:4, "^"))
# Estimators
moments_PSD(emp_eig, n-1, 4)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.