# RobVar: RobVar In RGMM: Robust Mixture Model

 RobVar R Documentation

## RobVar

### Description

Robust estimate of the variance

### Usage

``````RobVar(X, c=2, alpha=0.75, model='Gaussian', methodMCM='Weiszfeld',
methodMC='Robbins' , mc_sample_size=1000, init=rep(0, ncol(X)),
init_cov=diag(ncol(X)),
epsilon=10^(-8), w=2, df=3, niterMC=50,
``````

### Arguments

 `X` A numeric matrix of whose rows correspond to observations. `c` A positive scalar giving the constant in the stepsequence of the Robbins-Monro or Gradient method if `methodMC='RobbinsMC'` or `methodMC='GradMC'`. Default is `2`. `alpha` A scalar between 1/2 and 1 giving the power in the stepsequence for the Robbins-Monro algorithm is `methodMC='RobbinsMC'`. Default is `0.75`. `model` A string character specifying the model: can be `'Gaussian'` (default), `'Student'` or `'Laplace'`. `methodMCM` A string character specifying the method to estimate the Median Covariation Matrix. Can be `'Gmedian'` or `'Weiszfeld'` (defualt). `methodMC` A string character specifying the method to estimate robustly the variance. Can be `'Robbins'` (default), `'Fix'` or `'Grad'`. `mc_sample_size` A positive integer giving the number of data simulated for the Monte-Carlo method. Default is `1000`. `init` A numeric vector giving the initialization for estimating the median. `init_cov` A numeric matrix giving an initialization for estimating the Median Covariation Matrix. `epsilon` A positive scalar giving a stoping condition for algorithm. `w` A positive integer specifying the power for the weighted averaged Robbins-Monro algorithm if `methodMC='RobbinsMC'`. `df` An integer larger (or equal) than `3` specifying the degrees of freedom for the Student law if `model='Student'`. See also `Gen_MM`. Default is `3`. `niterMC` An integer giving the number of iterations for iterative algorithms if the selected method is `'Grad'` or `'Fix'`. Default is `50`. `cgrad` A numeric vector with positive values giving the stepsequence of the gradient algorithm for estimating the variance if `methodMC='Grad'`. Its length has to be equal to `niter`. `niterWeisz` A positive integer giving the maximum number of iterations for the Weiszfeld algorithms if `methodMCM='Weiszfeld'`. Default is `50`. `epsWeisz` A stopping factor for the Weiszfeld algorithm. `alphaMedian` A scalar betwwen 1/2 and 1 giving the power of the stepsequence of the gradient algorithm for estimating the Median Covariation Matrix if `methodMCM='Gmedian'`. Default is `0.75`. `cmedian` A positive scalar giving the constant in the stepsequence of the gradient algorithm for estimating the Median Covariation Matrix if `methodMCM='Gmedian'`. Default is `2`.

### Value

An object of class `list` with the following outputs:

 `median` The median of `X`. `variance` The robust variance of `X`. `median` The Median Covariation Matrix of `X`.

### 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 `RobMM` and `Gen_MM`.

### Examples

``````
n <- 2000
d <- 5
Sigma <-diag(1:d)
mean <- rep(0,d)
X <- mvtnorm::rmvnorm(n,mean,Sigma)
RVar=RobVar(X)
``````

RGMM documentation built on Nov. 24, 2023, 5:10 p.m.