# Huber: Huber's Least Favourable Distribution In hoa: Higher Order Likelihood Inference

## Description

Density, cumulative distribution, quantiles and random number generator for Huber's least favourable distribution.

## Usage

 ```1 2 3 4``` ```dHuber(x, k = 1.345) pHuber(q, k = 1.345) qHuber(p, k = 1.345) rHuber(n, k = 1.345) ```

## Arguments

 `x` vector of quantiles. Missing values (`NA`s) are allowed. `q` vector of quantiles. Missing values (`NA`s) are allowed. `p` vector of probabilities. Missing values (`NA`s) are allowed. `n` sample size. If `length(n)` is larger than 1, then `length(n)` random values are returned. `k` tuning constant. Values should preferably lie between 1 and 1.5. The default is 1.345, which gives 95% efficiency at the Normal.

## Details

Inversion of the cumulative distribution function is used to generate deviates from Huber's least favourable distribution.

## Value

Density (`dHuber`), probability (`pHuber`), quantile (`qHuber`), or random sample (`rHuber`) for Huber's least favourable distribution with tuning constant `k`. If values are missing, `NA`s will be returned.

## Side Effects

The function `rHuber` causes creation of the dataset `.Random.seed` if it does not already exist; otherwise its value is updated.

## Background

Huber's least favourable distribution is a compound distribution with gaussian behaviour in the interval (-`k`,`k`) and double exponential tails. It is strongly related to Huber's M-estimator, which represents the maximum likelihood estimator of the location parameter.

## References

Hampel, F. R., Ronchetti, E. M., Rousseeuw, P. J. and Stahel, W. A. (1986) Robust Statistics: The Approach Based on Influence Functions. New York: Wiley.

## Examples

 ```1 2 3 4``` ```pHuber(0.5) ## 0.680374 pHuber(0.5, k = 1.5) ## 0.6842623 ```

### Example output

``` 0.6803739
 0.6842623
```

hoa documentation built on May 2, 2019, 8:56 a.m.