powered by
Truncated Normal latents with non-unit variance are necessary for logistic BART.
draw_lambda_i(lambda, mean, kmax=1000, thin=1)
Previous value of lambda.
Mean of truncated Normal.
The number of terms in the mixture.
The thinning parameter.
Returns the variance for a truncated Normal, i.e., \(N(mean, lambda)I(tau, infinity)\).
rtnorm, lbart
# NOT RUN { set.seed(12) draw_lambda_i(1, 2) rtnorm(1, 2, sqrt(6.773462), 6) draw_lambda_i(6.773462, 2) # }
Run the code above in your browser using DataLab