rtnorm_cpp: Draw from univariate truncated normal

View source: R/RcppExports.R

rtnorm_cppR Documentation

Draw from univariate truncated normal

Description

rtnorm_cpp draws from a one-sided truncated univariate normal distribution. rttnorm_cpp draws from a two-sided truncated univariate normal distribution.

Usage

rtnorm_cpp(mean, sd, point, above, log = FALSE)

rttnorm_cpp(mean, sd, lower, upper, log = FALSE)

Arguments

mean

A numeric, the mean.

sd

A numeric, the standard deviation.

point

A numeric, the truncation point.

above

A logical, if TRUE truncation from above and if FALSE truncation from below.

log

A logical, if TRUE the draw is taken from the log-normal distribution. By default, log = FALSE.

lower

A numeric, the lower truncation point.

upper

A numeric, the upper truncation point.

Details

These function performs no input checks.

Value

A numeric, the random draw.


oeli documentation built on June 22, 2024, 10:03 a.m.