Robust_Mahalanobis_regression {RobRegression} | R Documentation |
Robust_Mahalanobis_regression
Description
We propose here a function which enables to provide a robust estimation of the parameters of Multivariate Gaussian Linear Models of the form Y = X \beta + \epsilon
where \epsilon
is a 0-mean Gaussian vector of variance \Sigma
. In addition, one can aslo consider a low-rank variance of the form \Sigma = C + \sigma I
where \sigma
is a positive scalar and C
is a matrix of rank d
. More precisely, the aim is to minimize the functional
G_\lambda(\hat{\beta}) = \mathbb{E}\left(\| Y-X\hat{\beta} \|_{\Sigma^{-1}}\right) + \lambda \|\hat{\beta}\|^{\text{Ridge}}
.
Usage
Robust_Mahalanobis_regression(X, Y, alphaRM=0.66, alphareg=0.66, w=2, lambda=0,
creg='default', K=2:30, par=TRUE, epsilon=10^(-8),
method_regression='Offline', niter_regression=50,
cRM='default', mc_sample_size='default',
method_MCM='Weiszfeld', methodMC='Robbins',
niterMC=50, ridge=1, eps_vp=10^(-4), nlambda=50,
scale='none', tol=10^(-3))
Arguments
X |
A |
Y |
A |
method_regression |
The method used for estimating the parameter. Should be |
niter_regression |
The maximum number of regression iterations if the fix point algorithm is used, i.e. if |
epsilon |
Stoping condition for the fix point algorithm if |
scale |
If a scaling is used. |
ridge |
The power of the penalty: i.e. should be |
lambda |
A vector giving the different studied penalizations. If |
par |
Is equal to |
nlambda |
The number of tested penalizations if |
alphaRM |
A scalar between 1/2 and 1 used in the stepsequence if the Robbins-Monro algorithm is used, i.e. if |
alphareg |
A scalar between 1/2 and 1 used in the stepsequence for stochastic gradient algorithm if |
w |
The power for the weighted averaged algorithms if |
creg |
The constant in the stepsequence if the averaged stochastic gradient algorithm is used, i.e. if |
K |
A vector containing the possible values of |
mc_sample_size |
The number of data generated for the Monte-Carlo method for estimating robustly the eigenvalues of the variance. |
method_MCM |
The method chosen to estimate Median Covariation Matrix. Can be |
methodMC |
The method chosen to estimate robustly the variance. Can be |
niterMC |
The number of iterations for estimating robustly the variance of each class if |
eps_vp |
The minimum values for the estimates of the eigenvalues of the Variance can take. Default is |
cRM |
The constant in the stepsequence if the Robbins-Monro algorithm is used to robustly estimate the variance, i.e. if |
tol |
A scalar that avoid numerical problems if method='Offline'. Default is |
Value
A list with:
beta |
A |
Residual_Variance |
A |
criterion |
A vector giving the loss for the different chosen |
all_beta |
A list containing the different estimation of the parameters (with respect to the different choices of |
lambda_opt |
A scalar giving the selected |
variance_results |
A list giving the results on the variance of the noise obtained with the help of the function |
Details of the list variance_results
:
Sigma |
The robust estimation of the variance. |
invSigma |
The robuste estimation of the inverse of the variance. |
MCM |
The Median Covariation Matrix. |
eigenvalues |
A vector containing the estimation of the |
MCM_eigenvalues |
A vector containing the estimation of the |
cap |
The result given for capushe for selecting |
reduction_results |
A list containing the results for all possible |
References
Cardot, H., Cenac, P. and Zitt, P-A. (2013). Efficient and fast estimation of the geometric median in Hilbert spaces with an averaged stochastic gradient algorithm. Bernoulli, 19, 18-43.
Cardot, H. and Godichon-Baggioni, A. (2017). Fast Estimation of the Median Covariation Matrix with Application to Online Robust Principal Components Analysis. Test, 26(3), 461-480
Vardi, Y. and Zhang, C.-H. (2000). The multivariate L1-median and associated data depth. Proc. Natl. Acad. Sci. USA, 97(4):1423-1426.
See Also
See also Robust_Variance
, Robust_regression
and RobRegression-package
.
Examples
p=5
q=10
n=2000
mu=rep(0,q)
Sigma=diag(c(q,rep(0.1,q-1)))
epsilon=mvtnorm::rmvnorm(n = n,mean = mu,sigma = Sigma)
X=mvtnorm::rmvnorm(n=n,mean=rep(0,p))
beta=matrix(rnorm(p*q),ncol=q)
Y=X %*% beta+epsilon
Res_reg=Robust_Mahalanobis_regression(X,Y,par=FALSE)
sum((Res_reg$beta-beta)^2)