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