m_est {robnptests} | R Documentation |
M-estimator of location
Description
m_est
calculates an M-estimate of location and its variance
for different psi functions.
Usage
m_est(
x,
psi,
k = robustbase::.Mpsi.tuning.default(psi),
tol = 1e-06,
max.it = 15,
na.rm = FALSE
)
Arguments
x |
a (non-empty) numeric vector of data values. |
psi |
kernel used for optimization.
Must be one of |
k |
tuning parameter(s) for the respective kernel function,
defaults to parameters implemented in |
tol |
tolerance for convergence. The default is 1e-06. |
max.it |
the maximum number of iterations. The default is 15. |
na.rm |
a logical value indicating whether NA values in |
Details
To compute the M-estimate, the iterative algorithm described in Maronna et al. (2019) is used. The variance is estimated as in Huber (1981).
If max.it
contains decimal places, it is truncated to an integer
value.
Value
A named list containing the components:
est |
estimated mean. |
var |
estimated variance. |
References
Maronna RA, Martin DR, Yohai VJ, Salibián-Barrera M (2019). Robust Statistics: Theory and Methods (with R), Wiley Series in Probability and Statistics, Second edition edition. Wiley. doi:10.1002/9781119214656.
Huber PJ (1981). Robust Statistics. Wiley, New York. doi:10.1002/0471725250.
Examples
# Generate random sample
set.seed(108)
x <- rnorm(10)
# Computer Huber's M-estimate
m_est(x, psi = "huber")