draw_lambda_i: Testing truncated Normal sampling

View source: R/draw_lambda_i.R

draw_lambda_iR Documentation

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

rtnorm, lbart

Examples


set.seed(12)

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


BART documentation built on June 22, 2024, 11:33 a.m.