Learn R Programming

tmvmixnorm (version 1.1.1)

norm_rej: Normal rejection sampling

Description

norm_rej is used for normal rejection sampling.

Usage

norm_rej(a, b = Inf)

Arguments

a

lower bound

b

upper bound

Value

norm_rej returns a list x: sampled value; and acc: total number of draw used.

Examples

Run this code
# NOT RUN {
set.seed(1)
norm_rej(a=1, b=Inf)

# }

Run the code above in your browser using DataLab