I am trying to use R to perform the shrinkage of covariance matrix towards constant correlation as defined in 'Honey, I Shrunk the Sample Covariance Matrix'.
I see there are two packages where this is already implemented:
library(MASS) library(tawny) library(RiskPortfolios) set.seed(10) matrixA=mvrnorm(n = 10000, 0.5, 0.2, tol = 1e-6, empirical = TRUE, EISPACK = FALSE) matrixA=matrix(matrixA,500,20)
The output should be the same covariance matrix however this doesn't happen. Would anyone know why?