unif_rej: Uniform rejection sampling

Description Usage Arguments Value Examples

View source: R/unif_rejection.R

Description

unif_rej is used for uniform rejection sampling.

Usage

1
unif_rej(a, b)

Arguments

a

lower bound

b

upper bound

Value

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

Examples

1
2
set.seed(1)
unif_rej(a=1, b=2)

tmvmixnorm documentation built on Sept. 19, 2020, 1:07 a.m.