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
.lddat = data.frame(y = rlaplace(nn <- 100, loc = 2, scale = exp(1)))
fit = vglm(y ~ 1, laplace, lddat, trace = TRUE, crit = "l")
coef(fit, matrix = TRUE)
Coef(fit)
with(lddat, median(y))
lddat = data.frame(x = runif(nn <- 1001))
lddat = transform(lddat, y = rlaplace(nn, loc = 2, scale = exp(-1+1*x)))
coef(vglm(y ~ x, laplace(iloc = .2, meth = 2, zero = 1), lddat,
trace = TRUE), matrix = TRUE)
Run the code above in your browser using DataLab