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

draw_lambda_i

Testing truncated Normal sampling


Description

Truncated Normal latents with non-unit variance are necessary for logistic BART.

Usage

draw_lambda_i(lambda, mean, kmax=1000, thin=1)

Arguments

lambda

Previous value of lambda.

mean

Mean of truncated Normal.

kmax

The number of terms in the mixture.

thin

The thinning parameter.

Value

Returns the variance for a truncated Normal, i.e., N(mean, lambda)I(tau, infinity).

See Also

Examples

set.seed(12)

draw_lambda_i(1, 2)
rtnorm(1, 2, sqrt(6.773462), 6)
draw_lambda_i(6.773462, 2)

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.