Learn R Programming

smoothmest (version 0.1-3)

dhuber: Huber's least favourable distribution

Description

Density for and random values from Huber's least favourable distribution, see Huber and Ronchetti (2009).

Usage

dhuber(x, k=0.862, mu=0, sigma=1)
  edhuber(x, k=0.862, mu=0, sigma=1)
  rhuber(n,k=0.862, mu=0, sigma=1)

Arguments

x

numeric vector.

k

numeric. Borderline value of central Gaussian part of the distribution. The default values refers to a 20% contamination neighborhood of the Gaussian distribution.

mu

numeric. distribution mean.

sigma

numeric. Distribution scale (sigma=1 defines the distribution in standard form, with standard Gaussian centre).

n

integer. Number of random values to be generated.

Value

dhuber gives out a vector of density values.

edhuber gives out a list with components val (density values) and eps (contamination proportion).

rhuber gives out a vector of random numbers generated by Huber's least favourable distribution.

Details

dhuber:

density.

edhuber:

density, and computes the contamination proportion corresponding to k.

rhuber:

random number generation.

References

Huber, P. J. and Ronchetti, E. (2009) Robust Statistics (2nd ed.). Wiley, New York.

Examples

Run this code
# NOT RUN {
  set.seed(123456)
  edhuber(1:5,k=1.5)
  rhuber(5)
# }

Run the code above in your browser using DataLab