ridgePrepEdiag {porridge} | R Documentation |
Ridge penalized estimation of the precision matrix from data with replicates.
Description
Estimation of precision matrices from data with replicates through a ridge penalized EM (Expectation-Maximization) algorithm. It assumes a simple 'signal+noise' model, both random variables are assumed to be drawn from a multivariate normal distribution with their own precision matrix. The signal precision matrix is unstructured, while the former is diagonal. These precision matrices are estimated.
Usage
ridgePrepEdiag(Y, ids, lambdaZ,
targetZ=matrix(0, ncol(Y), ncol(Y)),
nInit=100, minSuccDiff=10^(-10))
Arguments
Y |
Data |
ids |
A |
lambdaZ |
A positive |
targetZ |
A semi-positive definite target |
nInit |
A |
minSuccDiff |
A |
Details
Data are assumed to originate from a design with replicates. Each observation with
(
) the
-th replicate of the
-th sample, is described by a ‘signal+noise’ model:
, where
and
represent the signal and noise, respectively. Each observation
follows a multivariate normal law of the form
, which results from the distributional assumptions of the signal and the noise,
and
with
diagonal, and their independence. The model parameters are estimated by means of a penalized EM algorithm that maximizes the loglikelihood augmented with the penalty
, in which
is the shrinkage target of the signal precision matrix. For more details see van Wieringen and Chen (2019).
Value
The function returns the regularized inverse covariance list
-object with slots:
Pz |
The estimated signal precision matrix. |
Pe |
The estimated error precision matrix. |
penLL |
The penalized loglikelihood of the estimated model. |
Author(s)
W.N. van Wieringen.
References
van Wieringen, W.N., Chen, Y. (2021), "Penalized estimation of the Gaussian graphical model from data with replicates", Statistics in Medicine, 40(19), 4279-4293.
See Also
optPenaltyPrepEdiag.kCVauto
Examples
# set parameters
p <- 10
Se <- diag(runif(p))
Sz <- matrix(3, p, p)
diag(Sz) <- 4
# draw data
n <- 100
ids <- numeric()
Y <- numeric()
for (i in 1:n){
Ki <- sample(2:5, 1)
Zi <- mvtnorm::rmvnorm(1, sigma=Sz)
for (k in 1:Ki){
Y <- rbind(Y, Zi + mvtnorm::rmvnorm(1, sigma=Se))
ids <- c(ids, i)
}
}
# estimate
Ps <- ridgePrepEdiag(Y, ids, 1)