rtnorm | R Documentation |
Truncated Normal latents are necessary to transform a binary BART into a continuous BART.
rtnorm(n, mean, sd, tau)
n |
Number of samples. |
mean |
Mean. |
sd |
Standard deviation. |
tau |
Truncation point. |
Returns n
truncated Normals, i.e., N(mean, sd)I(tau, infinity)
.
Robert C. (1995) Simulation of truncated normal variables. Statistics and computing, 5(2), 121–125.
pbart, lbart
set.seed(12)
rtnorm(1, 0, 1, 3)
rtnorm(1, 0, 1, 3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.