ridgePgen {porridge} | R Documentation |
Ridge estimation of the inverse covariance matrix with element-wise penalization and shrinkage.
Description
Function that evaluates the generalized ridge estimator of the inverse covariance matrix with element-wise penalization and shrinkage.
Usage
ridgePgen(S, lambda, target, nInit=100, minSuccDiff=10^(-10))
Arguments
S |
Sample covariance |
lambda |
A symmetric |
target |
A semi-positive definite target |
nInit |
A |
minSuccDiff |
A |
Details
This function generalizes the ridgeP
-function in the sense that, besides element-wise shrinkage, it allows for element-wise penalization in the estimation of the precision matrix of a zero-mean multivariate normal distribution. Hence, it assumes that the data stem from \mathcal{N}(\mathbf{0}_p, \boldsymbol{\Omega}^{-1})
. The estimator maximizes the following penalized loglikelihood:
\log( | \boldsymbol{\Omega} |) - \mbox{tr} ( \boldsymbol{\Omega} \mathbf{S} ) - \| \boldsymbol{\Lambda} \circ (\boldsymbol{\Omega} - \mathbf{T}) \|_F^2,
where \mathbf{S}
the sample covariance matrix, \boldsymbol{\Lambda}
a symmetric, positive matrix of penalty parameters, the \circ
-operator represents the Hadamard or element-wise multipication, and \mathbf{T}
the precision matrix' shrinkage target. For more details see van Wieringen (2019).
Value
The function returns a regularized inverse covariance matrix
.
Author(s)
W.N. van Wieringen.
References
van Wieringen, W.N. (2019), "The generalized ridge estimator of the inverse covariance matrix", Journal of Computational and Graphical Statistics, 28(4), 932-942.
See Also
Examples
# set dimension and sample size
p <- 10
n <- 10
# penalty parameter matrix
lambda <- matrix(1, p, p)
diag(lambda) <- 0.1
# generate precision matrix
Omega <- matrix(0.4, p, p)
diag(Omega) <- 1
Sigma <- solve(Omega)
# data
Y <- mvtnorm::rmvnorm(n, mean=rep(0,p), sigma=Sigma)
S <- cov(Y)
# unpenalized diagonal estimate
Phat <- ridgePgen(S, lambda, 0*S)