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