Maximum likelihood estimation of the 2-parameter classical Laplace distribution.
laplace(llocation = "identitylink", lscale = "loge",
ilocation = NULL, iscale = NULL, imethod = 1, zero = "scale")
Character.
Parameter link functions for location parameter Links
for more choices.
Optional initial values. If given, it must be numeric and values are recycled to the appropriate length. The default is to choose the value internally.
Initialization method. Either the value 1 or 2.
See CommonVGAMffArguments
for information.
An object of class "vglmff"
(see vglmff-class
).
The object is used by modelling functions such as vglm
and vgam
.
This family function has not been fully tested.
The MLE regularity conditions do not hold for this distribution,
therefore misleading inferences may result,
e.g., in the summary
and vcov
of the object.
The Laplace distribution is often known as the
double-exponential distribution and,
for modelling, has heavier tail than the normal distribution.
The Laplace density function is
For y ~ 1
(where y
is the response) the maximum likelihood
estimate (MLE) for the location parameter is the sample median, and
the MLE for mean(abs(y-location))
(replace
location by its MLE if unknown).
Kotz, S., Kozubowski, T. J. and Podgorski, K. (2001) The Laplace distribution and generalizations: a revisit with applications to communications, economics, engineering, and finance, Boston: Birkhauser.
rlaplace
,
alaplace2
(which differs slightly from this parameterization),
exponential
,
median
.
# NOT RUN {
ldata <- data.frame(y = rlaplace(nn <- 100, loc = 2, scale = exp(1)))
fit <- vglm(y ~ 1, laplace, data = ldata, trace = TRUE, crit = "l")
coef(fit, matrix = TRUE)
Coef(fit)
with(ldata, median(y))
ldata <- data.frame(x = runif(nn <- 1001))
ldata <- transform(ldata, y = rlaplace(nn, loc = 2, scale = exp(-1 + 1*x)))
coef(vglm(y ~ x, laplace(iloc = 0.2, imethod = 2, zero = 1), data = ldata,
trace = TRUE), matrix = TRUE)
# }
Run the code above in your browser using DataLab