halfnorm_rej: Half-normal rejection sampling

View source: R/halfnorm_rejection.R

halfnorm_rejR Documentation

Half-normal rejection sampling

Description

halfnorm_rej is used for half-normal rejection sampling.

Usage

halfnorm_rej(a, b)

Arguments

a

lower bound

b

upper bound

Value

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

Examples

set.seed(1)
halfnorm_rej(a=1, b=Inf)


tmvmixnorm documentation built on May 11, 2026, 9:07 a.m.