unif_rej {tmvmixnorm} | R Documentation |
unif_rej
is used for uniform rejection sampling.
unif_rej(a, b)
a |
lower bound |
b |
upper bound |
unif_rej
returns a list
x
: sampled value; and
acc
: total number of draw used.
set.seed(1)
unif_rej(a=1, b=2)