1\name{mscale} 2\alias{mscale} 3 4\title{M Scale Estimation} 5\description{ 6Robust estimation of a scale parameter using Hampel's redescending psi function. 7} 8 9\usage{ 10mscale(u, na.rm=FALSE) 11} 12 13\arguments{ 14\item{u}{numeric vector of residuals.} 15\item{na.rm}{logical. Should missing values be removed?} 16} 17 18\value{numeric constant giving the estimated scale.} 19 20\details{ 21Estimates a scale parameter or standard deviation using an M-estimator with 50\% breakdown. 22This means the estimator is highly robust to outliers. 23If the input residuals \code{u} are a normal sample, then \code{mscale(u)} should be equal to the standard deviation. 24} 25 26\author{Gordon Smyth} 27 28\references{ 29Yohai, V. J. (1987). High breakdown point and high efficiency robust estimates for regression. \emph{Ann. Statist.} 15, 642-656. 30 31Stromberg, A. J. (1993). Computation of high breakdown nonlinear regression parameters. \emph{J. Amer. Statist. Assoc.} 88, 237-244. 32 33Smyth, G. K., and Hawkins, D. M. (2000). Robust frequency estimation using elemental sets. \emph{Journal of Computational and Graphical Statistics} 9, 196-214. 34} 35 36%\seealso{ 37%\code{\link{rho.hampel}}, \code{\link{psi.hampel}} 38%} 39 40\examples{ 41u <- rnorm(100) 42sd(u) 43mscale(u) 44} 45