Huber {extraDistr} | R Documentation |
"Huber density" distribution
Description
Density, distribution function, quantile function and random generation for the "Huber density" distribution.
Usage
dhuber(x, mu = 0, sigma = 1, epsilon = 1.345, log = FALSE)
phuber(q, mu = 0, sigma = 1, epsilon = 1.345, lower.tail = TRUE, log.p = FALSE)
qhuber(p, mu = 0, sigma = 1, epsilon = 1.345, lower.tail = TRUE, log.p = FALSE)
rhuber(n, mu = 0, sigma = 1, epsilon = 1.345)
Arguments
x , q |
vector of quantiles. |
mu , sigma , epsilon |
location, and scale, and shape parameters. Scale and shape must be positive. |
log , log.p |
logical; if TRUE, probabilities p are given as log(p). |
lower.tail |
logical; if TRUE (default), probabilities are |
p |
vector of probabilities. |
n |
number of observations. If |
Details
Huber density is connected to Huber loss and can be defined as:
where
References
Huber, P.J. (1964). Robust Estimation of a Location Parameter. Annals of Statistics, 53(1), 73-101.
Huber, P.J. (1981). Robust Statistics. Wiley.
Schumann, D. (2009). Robust Variable Selection. ProQuest.
Examples
x <- rhuber(1e5, 5, 2, 3)
hist(x, 100, freq = FALSE)
curve(dhuber(x, 5, 2, 3), -20, 20, col = "red", add = TRUE, n = 5000)
hist(phuber(x, 5, 2, 3))
plot(ecdf(x))
curve(phuber(x, 5, 2, 3), -20, 20, col = "red", lwd = 2, add = TRUE)
[Package extraDistr version 1.10.0 Index]