draw_lambda_i function

Testing truncated Normal sampling

Testing truncated Normal sampling

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

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.

Returns

Returns the variance for a truncated Normal, i.e., c("N(mean,\nN(mean,\n", "lambda)I(tau,infinity) 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)
  • Maintainer: Rodney Sparapani
  • License: GPL (>= 2)
  • Last published: 2024-06-21

Useful links