Description Usage Arguments Details Value Author(s) References See Also Examples
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
.
1 |
y |
observation vector. |
initial |
optional vector of initial values c(μ,σ,p). |
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.
The function returns a list with two objects
iter |
iterations to reach convergence. |
par |
vector of Maximum Likelihood Estimators. |
Christian E. Galarza <cgalarza88@gmail.com> and Victor H. Lachos <hlachos@ime.unicamp.br>
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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ## 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")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.