mleALD {ald} R Documentation

## Maximum Likelihood Estimators (MLE) for the Asymmetric Laplace Distribution

### Description

Maximum Likelihood Estimators (MLE) for the Three-Parameter Asymmetric Laplace Distribution defined in Koenker and Machado (1999) useful for quantile regression with location parameter equal to `mu`, scale parameter `sigma` and skewness parameter `p`.

### Usage

```mleALD(y, initial = NA)
```

### Arguments

 `y` observation vector. `initial` optional vector of initial values c(μ,σ,p).

### Details

The algorithm computes iteratevely the MLE's via the combination of the MLE expressions for μ and σ, and then maximizing with rescpect to p the Log-likelihood function (`likALD`) using the well known `optimize` R function. By default the tolerance is 10^-5 for all parameters.

### Value

The function returns a list with two objects

 `iter` iterations to reach convergence. `par` vector of Maximum Likelihood Estimators.

### Author(s)

Christian E. Galarza <cgalarza88@gmail.com> and Victor H. Lachos <hlachos@ime.unicamp.br>

### References

Yu, K., & Zhang, J. (2005). A three-parameter asymmetric Laplace distribution and its extension. Communications in Statistics-Theory and Methods, 34(9-10), 1867-1879.

`ALD`,`momentsALD`,`likALD`

### Examples

```## Let's try this function

param = c(-323,40,0.9)
y = rALD(10000,mu = param[1],sigma = param[2],p = param[3])  #A random sample
res = mleALD(y)

#Comparing
cbind(param,res\$par)

#Let's plot

seqq = seq(min(y),max(y),length.out = 1000)
dens = dALD(y=seqq,mu=res\$par[1],sigma=res\$par[2],p=res\$par[3])
hist(y,breaks=50,freq = FALSE,ylim=c(0,max(dens)))
lines(seqq,dens,type="l",lwd=2,col="red",xlab="x",ylab="f(x)", main="ALD Density function")

```

[Package ald version 1.3.1 Index]