DiscreteLaplace: Discrete Laplace exponential family

Description Usage Details Value Author(s) See Also Examples

View source: R/DiscreteLaplace.R

Description

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

Usage

1

Details

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

Value

See binomial or poisson

Author(s)

Mikkel Meyer Andersen <mikl@math.aau.dk> and Poul Svante Eriksen

See Also

glm glm.fit ddisclap binomial poisson

Examples

1
2
3
4
5
6
7
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

Example output

Call:
glm(formula = xs ~ 1, family = DiscreteLaplace())

Deviance Residuals: 
    Min       1Q   Median       3Q      Max  
-0.5817  -0.5817  -0.5817  -0.5817   1.3257  

Coefficients:
            Estimate Std. Error t value Pr(>|t|)    
(Intercept)  -2.4723     0.2189  -11.29   <2e-16 ***
---
Signif. codes:  0***0.001**0.01*0.05.’ 0.1 ‘ ’ 1

(Dispersion parameter for DiscreteLaplace family taken to be 0.8265264)

    Null deviance: 57.961  on 99  degrees of freedom
Residual deviance: 57.961  on 99  degrees of freedom
AIC: 119.89

Number of Fisher Scoring iterations: 6

[1] 0.08439459

disclap documentation built on Jan. 27, 2022, 5:07 p.m.