Laplace: Laplace Distribution

Description Usage Arguments Author(s) See Also Examples

Description

These functions provide information about the Laplace distribution with location parameter equal to m and dispersion equal to s: density, cumulative distribution, quantiles, log hazard, and random generation.

The Laplace distribution has density

f(y) = exp(-abs(y-m)/s)/(2*s)

where m is the location parameter of the distribution and s is the dispersion.

Usage

1
2
3
4
dlaplace(y, m=0, s=1, log=FALSE)
plaplace(q, m=0, s=1)
qlaplace(p, m=0, s=1)
rlaplace(n=1, m=0, s=1)

Arguments

y

vector of responses.

q

vector of quantiles.

p

vector of probabilities

n

number of values to generate

m

vector of location parameters.

s

vector of dispersion parameters.

log

if TRUE, log probabilities are supplied.

Author(s)

J.K. Lindsey

See Also

dexp for the exponential distribution and dcauchy for the Cauchy distribution.

Examples

1
2
3
4
dlaplace(5, 2, 1)
plaplace(5, 2, 1)
qlaplace(0.95, 2, 1)
rlaplace(10, 2, 1)

Example output

Attaching package: 'rmutil'

The following object is masked from 'package:stats':

    nobs

[1] 0.02489353
[1] 0.9751065
[1] 4.302585
 [1] 0.6416766 0.1411714 0.6102104 2.4806470 1.7332192 2.8765388 1.1901798
 [8] 2.8370569 1.6345562 1.8889534

rmutil documentation built on July 2, 2020, 4:07 a.m.

Related to Laplace in rmutil...