inclusionProbs | R Documentation |
Compute (model averaged) posterior inclusion probabilites for the
uncertain variables (including FP variables) based on a
BayesMfp
object.
inclusionProbs(BayesMfpObject, postProbs = posteriors(BayesMfpObject, ind = 1))
BayesMfpObject |
valid |
postProbs |
posterior probabilities to weight the models (defaults to the normalized probability estimates) |
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.
Daniel Saban\'es Bov\'e
## 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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.