normalizelogweights | R Documentation |
Compute normalized probabilities from unnormalized log-probabilities.
normalizelogweights(logw)
logw |
Vector of unnormalized log-probabilities. |
Guards against underflow or overflow by adjusting the log-probabilities so that the largest probability is 1.
Normalized probabilities such that the sum is equal to 1.
Peter Carbonetto peter.carbonetto@gmail.com
P. Carbonetto and M. Stephens (2012). Scalable variational inference for Bayesian variable selection in regression, and its accuracy in genetic association studies. Bayesian Analysis 7, 73–108.
logw <- rnorm(6)
w <- normalizelogweights(logw)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.