Description Usage Details Value Author(s) See Also Examples
View source: R/DiscreteLaplace.R
Discrete Laplace exponential family for models such as a generalized linear model.
1 |
This family can be used in for example fitting a generalized linear model using the glm
or glm.fit
function.
See binomial
or poisson
Mikkel Meyer Andersen <mikl@math.aau.dk> and Poul Svante Eriksen
glm
glm.fit
ddisclap
binomial
poisson
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
|
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.