edata <- data.frame(x2 = runif(nn <- 100) - 0.5)
edata <- transform(edata, x3 = runif(nn) - 0.5)
edata <- transform(edata, eta = 0.2 - 0.7 * x2 + 1.9 * x3)
edata <- transform(edata, rate = exp(eta))
edata <- transform(edata, y = rexp(nn, rate = rate))
with(edata, stem(y))
fit.slow <- vglm(y ~ x2 + x3, exponential, edata, trace = TRUE, crit = "c")
fit.fast <- vglm(y ~ x2 + x3, exponential(exp = FALSE), edata,
trace = TRUE, crit = "c")
coef(fit.slow, mat = TRUE)
summary(fit.slow)
Run the code above in your browser using DataLab