Learn R Programming

disclap (version 1.5.1)

Discrete Laplace exponential family: Discrete Laplace exponential family

Description

Discrete Laplace exponential family for models such as a generalized linear model.

Usage

DiscreteLaplace()

Arguments

Value

See binomial or poisson

Details

This family can be used in for example fitting a generalized linear model using the glm or glm.fit function.

See Also

glm glm.fit ddisclap binomial poisson

Examples

Run this code
# NOT RUN {
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
# }

Run the code above in your browser using DataLab