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)))
fit = vglm(y ~ x, laplace(iloc=0.2, meth=2, zero=1), lddat, trace=TRUE)
coef(fit, matrix=TRUE)
Run the code above in your browser using DataLab