Description Usage Arguments Value Author(s) References See Also Examples
This function computes robust estimates of the precision matrix Omega and of the expectation mu corresponding to the data matrix X
by solving a convex optimization problem. It implements the algorithms proposed by Balmand and Dalalyan (2015a, 2015b).
1 |
X |
The data matrix. |
lambda |
The penalization parameter that encourages robustness. |
gamma |
The penalization parameter that promotes sparsity. |
settings |
A list including all the parameters needed for the estimation.
|
desp
returns an object with S3 class "desp" containing the estimated parameters, with components:
Omega |
The precision matrix. |
mu |
The expectation vector. |
Theta |
The matrix corresponding to outliers. |
Psi |
The matrix of partial correlations, optional. |
B |
The matrix of the coefficients of regression, optional. |
simpleOut |
The outliers characterized by a very large Euclidean norm, optional. This observations have been excluded and do not appear in |
Arnak Dalalyan and Samuel Balmand.
Balmand, S. and Dalalyan, A. S. (2015a): On estimation of the diagonal elements of a sparse precision matrix, Posted as http://arxiv.org/abs/1504.04696.
Balmand, S. and Dalalyan, A. S. (2015b): Convex programming approach to robust estimation of a multivariate Gaussian model, Posted as http://arxiv.org/abs/1512.04734.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | ## set the dimension and the sample size
p <- 50
n <- 40
## define the true precision matrix
Omega <- 2*diag(p)
Omega[1,1] <- p
Omega[1,2:p] <- 2/sqrt(2)
Omega[2:p,1] <- 2/sqrt(2)
## generate the distribution
set.seed(1)
X <- MASS::mvrnorm(n, rep.int(0,p), MASS::ginv(Omega))
## define the settings
settings <- list("diagElem"="AD", "OLS"=FALSE)
## estimate the parameters of the distribution
params <- desp(X,lambda=0,gamma=sqrt(2*log(p)),settings=settings)
## error of estimation measured by Frobenius norm
sqrt(sum((Omega - params$Omega)^2))
## increase the sample size and generate the distribution again
n <- 1000
X <- MASS::mvrnorm(n, rep.int(0,p), MASS::ginv(Omega))
## estimate the parameters of the distribution
params <- desp(X,lambda=0,gamma=sqrt(2*log(p)),settings=settings)
## error of estimation measured by Frobenius norm
sqrt(sum((Omega - params$Omega)^2))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.