powered by
halfnorm_acc calculates the acceptance rate of half-normal rejection sampling for the truncation interval (a,b).
halfnorm_acc
halfnorm_acc(a, b)
lower bound for truncation.
upper bound for truncation.
# NOT RUN { set.seed(1203) halfnorm_acc(1,2) # }
Run the code above in your browser using DataLab