Discrete Laplace exponential family {disclap} | R Documentation |
Discrete Laplace exponential family for models such as a generalized linear model.
DiscreteLaplace()
This family can be used in for example fitting a generalized linear model using the glm
or glm.fit
function.
Mikkel Meyer Andersen <mikl@math.aau.dk> and Poul Svante Eriksen
glm
glm.fit
ddisclap
binomial
poisson
xs <- abs(rdisclap(100, 0.1))
fit <- glm(xs ~ 1, family = DiscreteLaplace())
summary(fit)
theta <- as.numeric(coef(fit)[1])
mu <- DiscreteLaplace()$linkinv(theta)
p <- (sqrt(1 + mu^2) - 1) / mu
p