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

mscale

Robust M-estimate of Scale


Description

Compute the M-estimate of scale using the MAD as initial estimate.

Usage

mscale(
  x,
  delta = 0.5,
  rho = c("bisquare", "huber", "gauss"),
  cc,
  eps = 1e-08,
  maxit = 200
)

Arguments

x

numeric vector.

delta

desired value for the right-hand side of the M-estimation equation.

rho

rho function to use in the M-estimation equation. Valid options are bisquare, huber and gauss.

cc

non-negative constant for the chosen rho function. If missing, it will be chosen such that the expected value of the rho function under the normal model is equal to delta.

eps

threshold for convergence. Defaults to 1e-8.

maxit

maximum number of iterations. Defaults to 200.

Details

This solves the M-estimation equation given by

∑_{i=1}^n ρ( x_i / s_n; cc ) = n delta

All NA values in x are removed before calculating the scale.

Value

Numeric vector of length one containing the solution s_n to the equation above.


pyinit

Pena-Yohai Initial Estimator for Robust S-Regression

v1.1.1
GPL (>= 2)
Authors
David Kepplinger [aut, cre], Matias Salibian-Barrera [aut], Gabriela Cohen Freue [aut]
Initial release
2020-11-23

We don't support your browser anymore

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