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

rtnorm

Testing truncated Normal sampling


Description

Truncated Normal latents are necessary to transform a binary BART into a continuous BART.

Usage

rtnorm(n, mean, sd, tau)

Arguments

n

Number of samples.

mean

Mean.

sd

Standard deviation.

tau

Truncation point.

Value

Returns n truncated Normals, i.e., N(mean, sd)I(tau, infinity).

References

Robert C. (1995) Simulation of truncated normal variables. Statistics and computing, 5(2), 121–125.

See Also

Examples

set.seed(12)

rtnorm(1, 0, 1, 3)
rtnorm(1, 0, 1, 3)

BART

Bayesian Additive Regression Trees

v2.9
GPL (>= 2)
Authors
Robert McCulloch [aut], Rodney Sparapani [aut, cre], Charles Spanbauer [aut], Robert Gramacy [aut], Matthew Pratola [aut], Martyn Plummer [ctb], Nicky Best [ctb], Kate Cowles [ctb], Karen Vines [ctb]
Initial release
2020-12-21

We don't support your browser anymore

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