powered by
Computes the posterior model probabilities based on the log-marginal likelihoods/negative NML values.
model_weights(x, prior)
vector or matrix of log-marginal probabilities or negative NML values (if matrix: one model per column)
vector of prior model probabilities (default: uniform over models). The vector is normalized internally to sum to one.
logmarginal <- c(-3.4, -2.0, -10.7) model_weights(logmarginal) nml <- matrix(c( 2.5, 3.1, 4.2, 1.4, 0.3, 8.2 ), nrow = 2, byrow = TRUE) model_weights(-nml)
Run the code above in your browser using DataLab