laplace(llocation="identity", lscale="loge",
elocation=list(), escale=list(),
ilocation=NULL, iscale=NULL,
method.init=1, zero=2)
Links
for more choices.earg
in Links
for general information.CommonVGAMffArguments
for more information."vglmff"
(see vglmff-class
).
The object is used by modelling functions such as vglm
and vgam
.summary
and vcov
of the object. 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 $b$ is mean(abs(y-location))
(replace
location by its MLE if unknown).
rlaplace
,
alaplace2
(which differs slightly from this parameterization),
exponential
,
median
.y = rlaplace(n <- 100, loc=2, scale=exp(1))
fit = vglm(y ~ 1, laplace, trace=TRUE, crit="l")
coef(fit, matrix=TRUE)
Coef(fit)
median(y)
x = runif(n <- 1001)
y = rlaplace(n, loc=2, scale=exp(-1+1*x))
fit = vglm(y ~ x, laplace(iloc=0.2, meth=2, zero=1), trace=TRUE)
coef(fit, matrix=TRUE)
Run the code above in your browser using DataLab