Description Usage Arguments Details Value Author(s) See Also Examples
Calculates the mass of observations from the discrete Laplace distribution.
| 1 2 3 | 
| x | vector of observations | 
| p | the parameter with 0 <= p < 1 | 
| lower.tail | logical; if TRUE (default), probabilities are P[X <= x], otherwise, P[X > x]. | 
| n | number of observations to generate | 
The probability mass function for the discrete Laplace distribution with parameter 0 < p < 1 is given by P(X = x) = ((1-p)/(1+p))*p^x for x = ..., -1, 0, 1, ....
If x is a vector, then p must have either length 1 or the same length as x. If p has length 1, then the value will be reused for all values in x.
'ddisclap' gives the probability mass, 'pdisclap' gives the distribution function, and 'rdisclap' generates random deviates.
Mikkel Meyer Andersen <mikl@math.aau.dk> and Poul Svante Eriksen
| 1 2 3 4 5 | p <- 0.3
xs <- (-4):4
probd <- ddisclap(xs, p)
data.frame(xs, probd)
plot(xs, probd, type = "l", xlab = "x", ylab = "P(X = x; p)")
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.