ddoublex {smoothmest}R Documentation

The double exponential (Laplace) distribution

Description

Density for and random values from double exponential (Laplace) distribution with density exp(-abs(x-mu)/lambda)/(2*lambda), for which the median is the ML estimator.

Usage

  ddoublex(x, mu=0, lambda=1)
  rdoublex(n,mu=0,lambda=1)

Arguments

x

numeric vector.

mu

numeric. Distribution median.

lambda

numeric. Scale parameter.

n

integer. Number of random values to be generated.

Details

ddoublex:

density.

rdoublex:

random number generation.

Value

ddoublex gives out a vector of density values.

rdoublex gives out a vector of random numbers generated by the double exponential distribution.

Author(s)

Christian Hennig chrish@stats.ucl.ac.uk http://www.homepages.ucl.ac.uk/~ucakche/

References

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

Examples

  set.seed(123456)
  ddoublex(1:5,lambda=5)
  rdoublex(5,mu=10,lambda=5)

[Package smoothmest version 0.1-3 Index]