Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

rtnorm

Random Generation from a Truncated Normal Distribution


Description

Samples from the Truncated Normal Distribution

Usage

rtnorm(n = 1, mean = 0, sd = 1, lower = -Inf, upper = Inf)

Arguments

n

integer: number of samples to be drawn

mean

vector of means

sd

vector of standard deviations

lower

left truncation point

upper

right truncation point

Value

vector

Author(s)

Jarrod Hadfield j.hadfield@ed.ac.uk

References

Robert, C.P. (1995) Statistics & Computing 5 121-125

See Also

Examples

hist(rtnorm(100, lower=-1, upper=1))

MCMCglmm

MCMC Generalised Linear Mixed Models

v2.32
GPL (>= 2)
Authors
Jarrod Hadfield
Initial release
2021-03-12

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.