Learn R Programming

mcbette (version 1.15.3)

calc_weights: Calculate the weights for each marginal likelihood

Description

Calculate the weights for each marginal likelihood

Usage

calc_weights(marg_liks)

Value

the weight of each marginal likelihood estimate, which will sum up to 1.0

Arguments

marg_liks

(non-log) marginal likelihood estimates

Author

Richèl J.C. Bilderbeek

Examples

Run this code
# Evidences (aka marginal likelihoods) can be very small
evidences <- c(0.0001, 0.0002, 0.0003, 0.0004)

# Sum will be 1.0
calc_weights(evidences)

beastier::remove_beaustier_folders()
beastier::check_empty_beaustier_folders()

Run the code above in your browser using DataLab