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