laplace {bda} | R Documentation |
Density, distribution function, quantile function and random
generation for the Laplace (double exponential) distribution
with mean mu
and rate rate
(i.e., mean 1/rate
).
dlap(x, mu=0, rate=1) plap(q, mu=0, rate=1) qlap(p, mu=0, rate=1) rlap(n, mu=0, rate=1) fitlap(x,mu)
x, q |
vector of quantiles. |
p |
vector of probabilities. |
n |
number of observations. If |
mu |
vector of means. |
rate |
vector of rates. |
If mu
is not specified, it assumes the default value of
0
.
If rate
is not specified, it assumes the default value of
1
.
dlap
gives the density,
plap
gives the distribution function,
qlap
gives the quantile function, and
rlap
generates random deviates.
exp
for the exponential function.
Distributions for other standard distributions, including
dgamma
for the gamma distribution and
dexp
for the exponential distribution.
dweibull
for the Weibull distribution, both of which
generalize the exponential.
dlap(100) x <- rlap(1000,mu=0, rate=0.5) x0 = seq(-7,7, length=100) fitlap(x) plot(density(x), xlim=c(-7,7), ylim=c(0,0.35)) (out = fitlap(x)) lines(dlap(x0, out$mu, out$rate)~x0, col=2, lty=2) (out = fitlap(x, mu=0)) lines(dlap(x0, out$mu, out$rate)~x0, col=4, lty=2)