inclusionProbs: Compute (model averaged) posterior variable inclusion...

inclusionProbsR Documentation

Compute (model averaged) posterior variable inclusion probabilites

Description

Compute (model averaged) posterior inclusion probabilites for the uncertain variables (including FP variables) based on a BayesMfp object.

Usage

inclusionProbs(BayesMfpObject, postProbs = posteriors(BayesMfpObject, ind = 1))

Arguments

BayesMfpObject

valid BayesMfp object

postProbs

posterior probabilities to weight the models (defaults to the normalized probability estimates)

Value

Named numeric vector with the estimated variable inclusion probabilities. Note that these can differ noticeably from the “global” inclusion probabilities computed from all discovered models, from which only the best were saved in the BayesMfp object.

Author(s)

Daniel Saban\'es Bov\'e

Examples

## construct a BayesMfp object
set.seed(19)

x1 <- rnorm (n=15)
x2 <- rbinom (n=15, size=20, prob=0.5) 
x3 <- rexp (n=15)

y <- rt (n=15, df=2)

test <- BayesMfp (y ~ bfp (x2, max = 4) + uc (x1 + x3), nModels = 200, method="exhaustive")

## now get the local inclusion probabilities
local <- inclusionProbs(test)

## they can be compared with the global inclusion probabilities
local - attr(test, "inclusionProbs")

bfp documentation built on Nov. 1, 2022, 1:05 a.m.

Related to inclusionProbs in bfp...