pmp: Extract Posterior Model Probabilities

View source: R/accessors.R

pmpR Documentation

Extract Posterior Model Probabilities

Description

Returns the posterior probability of each model in the model space.

Usage

pmp(x, ...)

## S3 method for class 'badp_bma'
pmp(x, prior = c("binomial", "beta"), top = NULL, ...)

Arguments

x

An object of class badp_bma.

...

Arguments passed to methods.

prior

Model prior: "binomial" (the default) or "beta".

top

Optional number of models to return, ordered by decreasing posterior probability. By default every model is returned, unsorted.

Value

A numeric vector of posterior model probabilities, one per model, in the order in which the models are held in the model space unless top is given.

See Also

pip, best_models, model_pmp

Examples


data(full_model_space)
results <- bma(full_model_space)

sum(pmp(results))        # sums to one
pmp(results, top = 5)    # the five most probable models



badp documentation built on Sept. 15, 2026, 1:08 a.m.