Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

MLocDis

Robust univariate location and scale M-estimators


Description

This function computes M-estimators for location and scale.

Usage

locScaleM(x, psi = "mopt", eff = 0.95, maxit = 50, tol = 1e-04,
  na.rm = FALSE)

Arguments

x

a vector of univariate observations

psi

a string indicating which score function to use. Valid options are "bisquare", "huber", "opt" and "mopt".

eff

desired asymptotic efficiency. Valid options are 0.85, 0.9 and 0.95 (default) when psi = "bisquare" or "huber", and 0.85, 0.9, 0.95 (default) and 0.99 when psi = "opt" or "mopt".

maxit

maximum number of iterations allowed.

tol

tolerance to decide convergence of the iterative algorithm.

na.rm

a logical value indicating whether NA values should be stripped before the computation proceeds. Defaults to FALSE

Details

This function computes M-estimators for location and scale.

Value

A list with the following components:

mu

The location estimate

std.mu

Estimated standard deviation of the location estimator mu

disper

M-scale/dispersion estimate

Author(s)

Ricardo Maronna, rmaronna@retina.ar

References

Examples

set.seed(123)
r <- rnorm(150, sd=1.5)
locScaleM(r)
# 10% of outliers, sd of good points is 1.5
set.seed(123)
r2 <- c(rnorm(135, sd=1.5), rnorm(15, mean=-10, sd=.5))
locScaleM(r2)

RobStatTM

Robust Statistics: Theory and Methods

v1.0.2
GPL (>= 3)
Authors
Matias Salibian-Barrera [cre], Victor Yohai [aut], Ricardo Maronna [aut], Doug Martin [aut], Gregory Brownson [aut] (ShinyUI), Kjell Konis [aut], Kjell Konis [cph] (erfi), Christophe Croux [ctb] (WBYlogreg, BYlogreg), Gentiane Haesbroeck [ctb] (WBYlogreg, BYlogreg), Martin Maechler [cph] (lmrob.fit, lmrob..M..fit, lmrob.S), Manuel Koller [cph] (lmrob.fit, .vcov.avar1, lmrob.S, lmrob.lar), Matias Salibian-Barrera [aut]
Initial release
2020-03-02

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.