
Last chance! 50% off unlimited learning
Sale ends in
exponential(link = "loge", earg = list(), location = 0, expected = TRUE)
Links
for more choices.earg
in Links
for general information.TRUE
Fisher scoring is used,
otherwise Newton-Raphson. The latter is usually faster."vglmff"
(see vglmff-class
).
The object is used by modelling functions such as vglm
,
and vgam
.amlexponential
,
laplace
,
expgeometric
,
poissonff
,
mix2exp
,
freund61
.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