rlaplace {jmuOutlier} | R Documentation |
Laplace (Double Exponential) Random Generation
Description
Laplace (double exponential) random generation with mean equal to mean
and standard deviation equal to sd
.
Usage
rlaplace(n, mean = 0, sd = 1)
Arguments
n |
Number of observations. If |
mean |
Population mean. |
sd |
Population standard deviation. |
Details
The Laplace distribution has density
e^{-|x-\mu| \sqrt{2} / \sigma} / (\sigma \sqrt{2}),
where \mu
is the mean of the distribution and \sigma
is the standard deviation.
Value
rlaplace
generates random deviates.
Note
The formulas computed within rlaplace
are based on the textbook by Higgins (2004).
Author(s)
Steven T. Garren, James Madison University, Harrisonburg, Virginia, USA
References
Higgins, J. J. (2004) Introduction to Modern Nonparametric Statistics.
See Also
dlaplace
, plaplace
, and qlaplace
.
Examples
# 20 random variates from a Laplace( 50, 10 ) distribution.
rlaplace( 20, 50, 10 )
[Package jmuOutlier version 2.2 Index]