powered by
halfnorm_rej is used for half-normal rejection sampling.
halfnorm_rej
halfnorm_rej(a, b)
lower bound
upper bound
halfnorm_rej returns a list x: sampled value; and acc: total number of draw used.
x
acc
# NOT RUN { set.seed(1) halfnorm_rej(a=1, b=Inf) # }
Run the code above in your browser using DataLab