rlaplace: Sample from a Laplace (also called double-exponential)...

Description Usage Arguments Value Examples

Description

Simulates a sample of Laplace-distributed data. Note that there are other rlaplace() functions (such as in the rmutil package), but their parameters may differ from this one, which uses the expectation and standard deviation (analogous to rnorm()).

Usage

1
rlaplace(n, mu = 0, sigma = 1)

Arguments

n

The number of independent observations to draw (i.e. sample size).

mu

The expectation of the Laplace distribution.

sigma

The standard deviation of the Laplace distribution.

Value

A vector of Laplace-distributed random numbers of length n.

Examples

1
rlaplace(10, 0, 1)

mdedge/stfspack documentation built on May 9, 2019, 8:17 a.m.