Learn R Programming

tmvmixnorm (version 1.1.1)

exp_rej: Translated-exponential rejection sampling

Description

exp_rej is used for translated-exponential rejection sampling.

Usage

exp_rej(a, b = Inf, lam = "default")

Arguments

a

lower bound

b

upper bound

lam

lambda for translated-exponential only

Value

exp_rej returns a list x: sampled value; and acc: total number of draw used.

Examples

Run this code
# NOT RUN {
set.seed(1)
exp_rej(a=1, b=Inf)

# }

Run the code above in your browser using DataLab