rtnorm {BART} | R Documentation

## 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).

### Author(s)

Robert McCulloch: robert.e.mcculloch@gmail.com,
Rodney Sparapani: rsparapa@mcw.edu
, Robert Gramacy: rbg@vt.edu.

### References

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

### See Also

`pbart, lbart`

### Examples

    set.seed(12)

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

[Package BART version 2.5 Index]