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

mscale

M Scale Estimation


Description

Robust estimation of a scale parameter using Hampel's redescending psi function.

Usage

mscale(u, na.rm=FALSE)

Arguments

u

numeric vector of residuals.

na.rm

logical. Should missing values be removed?

Details

Estimates a scale parameter or standard deviation using an M-estimator with 50% breakdown. This means the estimator is highly robust to outliers. If the input residuals u are a normal sample, then mscale(u) should be equal to the standard deviation.

Value

numeric constant giving the estimated scale.

Author(s)

Gordon Smyth

References

Yohai, V. J. (1987). High breakdown point and high efficiency robust estimates for regression. Ann. Statist. 15, 642-656.

Stromberg, A. J. (1993). Computation of high breakdown nonlinear regression parameters. J. Amer. Statist. Assoc. 88, 237-244.

Smyth, G. K., and Hawkins, D. M. (2000). Robust frequency estimation using elemental sets. Journal of Computational and Graphical Statistics 9, 196-214.

Examples

u <- rnorm(100)
sd(u)
mscale(u)

statmod

Statistical Modeling

v1.4.36
GPL-2 | GPL-3
Authors
Gordon Smyth [cre, aut], Yifang Hu [ctb], Peter Dunn [ctb], Belinda Phipson [ctb], Yunshun Chen [ctb]
Initial release
2021-05-10

We don't support your browser anymore

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